我遇到了与Richer i18n translation with CakePHP 3相同的问题,但即使使用给定的解决方案(使用.po文件而不是.pot),CakePHP也拒绝翻译。 在我不同的尝试中,我:
顺便说一下,有完整的src / Locale / en / default.po
# LANGUAGE translation of CakePHP Application
# Copyright YEAR NAME <EMAIL@ADDRESS>
#
msgid ""
msgstr ""
"Project-Id-Version: PROJECT VERSION\n"
"POT-Creation-Date: 2015-08-07 08:21+0000\n"
"PO-Revision-Date: 2015-08-07 10:22+0100\n"
"Last-Translator: \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n>1);\n"
"X-Generator: Poedit 1.5.4\n"
"Language: en\n"
#: Template/Pages/index1.ctp:1
msgid "Hey, bonjour"
msgstr "hello"
但我的页面仍显示未翻译的“嘿,bonjour”......
我可能会错过一个非常明显的事情,但是哪一个?
提前致谢
伊凡