Categories In Databases


I have some categories in my Database.

For Example some Countries.

ID 1 NAME England

ID 2 NAME France

ID 3 NAME Spain

If I want to translate these categories into other languages, is it useful to save the categories in english (My sourceLanguage) like in my example or is it better to save just keys for the names?

Are there any good tutorials about internalization? I’ve read “Agile Web Application Development” and the “YII Cookbook” but the explanations are sparse :frowning:


It is not a good idea.

Instead of doing so, you need to translate them and save in database.

There should be something like as


id             name

1              ENGLISH

2              URDU


id cat_id lang_id value

1  1       1      Shop

2  1       2      Dukan


Ok, thanks… do you know some good tutorials for internalization?

How can I set flags on the site and change the language?

How can I recognize from which countries the users come?

Should I save the language in the Session (cookie) of the user?


your post sounds like this

1 - Set a Default Language in config.php

2 - Use Portlet/widget to allow user to select language he wants

3 - Yes, it is important. If you do not want then have sub domains or sub dirs i.e. or

Check some below