Suggested method of Internationalization in MySQL? -


I have a website at Kohana and I'm planning it for multi-language
now i i18n folder And the way I know the way inside each language folder - there is some kind of string.php file ..
but I want to be in a dynamic way (on DB) so that whenever I want to change the value through the website Are there.

Is there a general table schema commonly used for multi-lang material?

OK, you probably can copy a "resource" file into your database, / P>

You can work in a table as a list for your wires, with two columns, such as another table with supported languages ​​

  language ID, name 1,  
  LangConstant ID, Constant_N name 1, Hello_Staining  

English 2, Spanish

and the actual data With table:

  occurred D, language, constant, value1, 1, 1, "hello world!" 10, 2, 1, "Whole Mundo!"  

and you can do a query like:

  from SELECT Value from Lang_Constant_values ​​where language = (select from id id where name = 'english' ) And continuously = (choose ID from Lang_Constants where Constant_Name = 'HELLO_STRING')  

Comments

Popular posts from this blog

windows - Heroku throws SQLITE3 Read only exception -

lex - Building a lexical Analyzer in Java -

python - rename keys in a dictionary -