1

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?

4

2 回答 2

2

好吧,我修复了它,我做了以下工作以使 CakePHP formhelper 几个月的多语言和荷兰语翻译工作:

1 - 我创建了一个名为 app/Locale/nl_NL/LC_MESSAGES 的文件夹

2 - 我通过控制台运行 ./Console/cake i18n extract

3 - 我在 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 - 我使用 poEdit 从 default.pot 和 cake.pot 创建 .po(和 .mo)文件。我将 .po(和 .mo)文件放在了之前创建的文件夹中。

5 - 我在 bootstrap.php 中放置了以下行:

Configure::write('Config.language','nl_NL');
于 2013-07-22T15:01:37.920 回答
1

他们使用不同的翻译域(例如 cake、cake_dev)。您必须翻译这些文件。请参见 __d 函数。

于 2013-07-22T12:31:37.040 回答