Different languages in db

Results 1 to 4 of 4

Thread: Different languages in db

  1. #1
    Inanna Guest

    Default Different languages in db

    Does anyone have any advice for the structure of a database that will be queried for entries in 2 different languages?<BR>I want to have a site display articles, news, etc in either english or norwegian so I want to store both texts in the database. Would it be best, for example, to have one table with all the info plus a column for englishtext and another for norwegiantext or would it be better to have separate tables?<BR><BR>Maybe someone could point me to a tutorial or article dealing with this sort of thing<BR>

  2. #2
    mark Guest

    Default RE: Different languages in db

    http://www.4guysfromrolla.com/webtech/040599-2.shtml<BR>http://www.4guysfromrolla.com/webtech/041499-1.shtml<BR><BR>I&#039;ve seen it done as one record with fields for each language, tho don&#039;t know if that is the recommeded method (see normalization of data).<BR><BR>Mark

  3. #3
    Eddie Campbell Guest

    Default RE: Different languages in db

    When I have done this in the past, I have stored the data in two (or more) columns in the same table. This means that you don&#039;t have to keep changing the tablenames when selecting the data.<BR><BR>If you call the columns something like<BR><BR>NOText for Norwegian and GBText for English, you can then do something like this<BR><BR>Set a session var to hold eith NO or GB depending on the users preferred language.<BR><BR>then<BR><BR>Sql = "Select " & Session("PrefLang") & "Text as ArticleText From TblArticles"<BR><BR>Response.Write rs("ArticleText")<BR><BR>This will then display the data in the correct language.<BR><BR>You may also want to set the correct system locale (Session.LCID) to whatever suits the user.<BR><BR>Hope this helps

  4. #4
    Inanna Guest

    Default RE: Different languages in db

    That helps a lot thankyou very much

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts