I built an website using cakephp. Users can switch between 2 languages(English and Japanese) to access all the pages.
In my back end database, I want to save data clients (MySQL) in 2 languages. Currently I have 2 approaches:
Approach 1: use 1 table with 2 columns field_en and field_ja
+clients
id | client_name_en | client_name_ja | others…
2 | Morning | Asha | …
Approach 2: use 2 tables, the second table will store the id and the correspond name in 2 languages
+clients
id | others…
+clients_lang
[client_id, language_id , client_name]
Row 1: 2 | 1 | Morning
Row 2: 2 | 2 | Asha
Note: 1 is for english, 2 is for japanese.
Which approach is better for my case.
See below url first
http://book.cakephp.org/2.0/en/core-libraries/internationalization-and-localization.html
OR
try this
//Internationalizing Your Application
or:
//Localization in CakePHP
///Translating model validation errors