Question

I would like to see a Dutch translation of the CakePHP 2.3.7 formhelper months. See this link: http://dev4.west-dyke.com/verhuur/reserveren.

However I can't seem to get it working. I also saw another post about this problem, but it still didn't solve the problem.

I created a folder named app/Locale/nl_NL/LC_MESSAGES/cake.po. The PO file was generated with poedit from cake.pot in the app/Locale directory.

I added these lines to cake.po:

msgid "January"
msgstr "Januari"

msgid "February"
msgstr "Februari"

msgid "March"
msgstr "Maart"

msgid "April"
msgstr "April"

msgid "May"
msgstr "Mei"

msgid "June"
msgstr "Juni"

msgid "July"
msgstr "Juli"

msgid "August"
msgstr "Augustus"

msgid "September"
msgstr "September"

msgid "October"
msgstr "Oktober"

msgid "November"
msgstr "November"

msgid "December"
msgstr "December"

I added the following line to the bottom of my bootstrap.php file:

Configure::write('Config.language','nl_NL');

Does anybody have an idea of what's going wrong?

Was it helpful?

Solution

Allright I fixed it, I did the following to get multi language and a Dutch translation of the CakePHP formhelper months working:

1 - I created a folder named app/Locale/nl_NL/LC_MESSAGES

2 - I ran ./Console/cake i18n extract through the console

3 - I added the following lines to cake.pot:

msgid "January"
msgstr "Januari"

msgid "February"
msgstr "Februari"

msgid "March"
msgstr "Maart"

msgid "April"
msgstr "April"

msgid "May"
msgstr "Mei"

msgid "June"
msgstr "Juni"

msgid "July"
msgstr "Juli"

msgid "August"
msgstr "Augustus"

msgid "September"
msgstr "September"

msgid "October"
msgstr "Oktober"

msgid "November"
msgstr "November"

msgid "December"
msgstr "December"

4 - I used poEdit to create .po (and .mo) files from default.pot and cake.pot. I placed the .po (and .mo) files inside the earlier created folder.

5 - I placed the following line inside bootstrap.php:

Configure::write('Config.language','nl_NL');

OTHER TIPS

They use a different translation domain (e.g. cake, cake_dev). You'll have to translate these files. See __d function.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top