2

For the front end of our web app, we're using the Language class of Codeigniter to support multiple languages.

For the back end: Some values in the database also need to be in multiple languages as they will be displayed on the front end.

Here are two approaches I have read about:

  • Using language-specific columns for each field: title_en, title_es, title_fr
  • Using one separate table that contains all translations

Was wondering if there were any more (better) approaches we should be aware about?

Obay
  • 3,135
  • 15
  • 55
  • 78
  • Take a look at http://stackoverflow.com/questions/316780/schema-for-a-multilanguage-database - quite a few suggestions are in there. I personally recommend the 3rd approach listed in the original question, since it allows easy fallback to the "primary" language using a outer join / NVL structure. – Kerbocat Jun 15 '12 at 19:03

1 Answers1

0

That's what I usually do as well, but a table with all the columns: element, en, fr, es might be better, that way each row is referenced by the column element (or id or any other name) and adding or deleting languages will be really easy as all you have to do is add/delete a column

NaturalBornCamper
  • 3,675
  • 5
  • 39
  • 58