Does this implementation scale well:
Requirement is:
System must support x number of languages; where x will = as many languages as business can translate
All system maintained values (page content, email content, values stored in the hundreds of lookup tables which are user facing) need to support multi-language.
My implementation:
Tables: (sample names used)
local_text_table
language_lookup_table
Content_table_1
Content_table_2
Content_table_3
Content_table_4
....
Plan:
language_lookup_table has list of all possible languages
lang_id lang_name
local_text_table has list of all possible text used on system (emails, page content, menu labels, footer text etc) along with 1 colunm for each language that system will support - FK to the language_lookup_table.
text_id
eng_text
spanish_text
arabic_text
...
This way all translation is stored in 1 table for entire system. I can enable/disabled/update/edit/add/remove translations in 1 step. in the code all text is stored as a keyword referencing to (text_id). System detects what language the user's session is running and accordingly pulls the text from the column for that keyword. if a particular row is NULL (not translated) it will default to the English text column.
Is this good?
Of course this will not work for the lookup values stored in the hundreds of tables, for that I have no plan as yet apart from giving each table it's own colunms for each language. Then I have user content also to allow users to translate their user postings like blogs, comments etc for which I don't have a plan. But I want to fist focus on the system text and finalize that.