Reputation: 11
How would I go about defining a table with a language specific (qualified) attribute?
For example:
ID| object |description (english)|description (french)| size | color (english) | color (french)
in the above example we have 3 'normal' fields and 2 language qualified fields : description and color.
What is best practice for defining these type of fields within one table?
Upvotes: 1
Views: 67
Reputation: 1269763
There are different ways of doing this. But a method for your specific data is to have another table with one row per language. Such as table would have:
Then the "object" table would have
Note: This is definitely not the only approach. If you need everything in your system translated, then you want a more sophisticated and generic mechanism. You may also need to take into account things like French sizes are different from sizes in other countries -- even countries that speak the same language.
Upvotes: 1