Monday, July 27, 2009

Re: Cakephp multilingual

Is that your site .. multilingual works great. Well done!
OK let's try and follow this step by step. If you have the time I
would
appreciate it. Otherwise no worries maybe someone else can help on the
way.

** A **
So I have a table with articles and a table with i18n
I set the core.php: Configure::write('Config.language', 'eng');
so that when I add an article it gets saved on the i18n table as well.

** B **
I guess the next step is to set up the po files.
I am using 3 languages: Greek, Russian, English
The way I see it since there are no final standards for language code
I could use any format (however stick to it)
So for greek: gre / english: eng / russian: rus
I create 3 directories under locale named: gre, eng, rus
then on each directory I create LC_MESSAGES
Then I go to console and have cake i18n extract a single file (all
merged) and copy this file to all 3 directories.
** After this step poedit still generates an error [:6: invalid
nplurals value / :6: field `Language-Team' still has initial default
value ]
** However the file is saved and data exists when re-opened
I Tried changing the core default language to gre (my only method at
the moment) but the translations from the po file do not apply
It seems that the method for the po construction used in the
http://tinyurl.com/4w3d49 differs from mine. He merges all
translations
into 1 file as I see it. And uses variable names on the cakephp files
and gives the actual text from the po files. How can I do that ??

** C **
Step 3 would be to set a way to change the language and reflect that
to the database queries as well on the correct po-file read.
This is where I get stuck. I have stored a few articles using distinct
locale values on the databases but don't know where to go to.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to cake-php+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

No comments: