Translating add-ons?

Permalink
I've translated the Extended Form-addon, but I can't find any documentation about how this should be setup.

Where should the mo/po-files be placed and should the language be assigned in the add-on or is it taken from the config.php-file?

 
12345j replied on at Permalink Reply
12345j
not sure, but try messaging this guy:
https://www.concrete5.org/profile/-/47/...
hes super helpful with translating, so he'll probably know.
tommyf replied on at Permalink Reply
Thanks, I'll try that :)
cali replied on at Permalink Best Answer Reply
cali
hi :)

i answer here it's better than in private message :)

here is a doc i wrote:http://www.concrete5.org/documentation/how-tos/developers/how-to-tr...

to do short:

*you define your locale in the /config/site.php file
*you take your .mo language files and put it in: (with cc_CC replaced by your iso country code like fr_FR for France or other)
- /languages/cc_CC/LC_MESSAGES/messages.mo (for the core language file of c5)
- /packages/you_pacquages/languages/cc_CC/LC_MESSAGES/messages.mo (for the language file of the translated package)
* clear the cache

And C5 magickly do the job :)

for french reader there is a tuto here:http://cms.concrete5.fr/doc/les-applications-de-c5/comment-traduire...
and some packages translations here:http://cms.concrete5.fr/ressources/telecharger-une-traduction/

hope this help you. if you need more explainations don't hesitate to ask :)

cali.
tommyf replied on at Permalink Reply
Hi cali,

Thank you for responding in this thread. I'm sure that it will be usefull for many others in years to come :)

I've added this to site.php:
define("LOCALE", 'da_DK');

And placed the default.mo/default.po here:
/packages/extended_form/languages/da_DK/LC_MESSAGES/

But the error-messages which I've translated in the .mo-file are still in english (i have cleared the cach).

Can you see anything wrong in that setup?
cali replied on at Permalink Reply
cali
hi your files have to named messages.mo (the .po one is just for local work, c5 don't need it, only compiled one is used)

to compile from .po to .mo file with poedit (or from terminal if you prefer) be shure that your catalog is correctly defined. specially the plural forms and locale setup.
tommyf replied on at Permalink Reply
Thank yoy, the error where then in the naming of the file. I've saved this thread for later reference :)