Is this good design for multi-language of system text to support x number of langs? [closed]

孤街浪徒 提交于 2019-12-04 11:54:25

Your design is flawed in that you won't be able to add a new language without adding a column to local_text_table.

A better design for that table would be:

text_id
lang_id (foreign key to language_lookup_table)
translated_text

Now you can add a language to language_lookup_table and then start adding translations to local_text_table without making any changes to your relational model. If you have the means to enter this data via a UI (or even directly in the database), you should be able to add new languages directly in production.

Clearly you will need an intersection between every table you want to have support in multi language and language table. Also I recommend to use a flag in languages table with the meaning of "installed language" which means that in a particular implementation can be used only some useful languages. This flag will helps you to display in a list only interest languages, not all. Also, the language table you can find all LCID codes in Microsoft forums, already with LCID code which is already used and is common.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!