我正在尝试使用po2php将我的.po文件转换为Zend php翻译数组。如何使用Translate Toolkit将.po转换为PHP数组(Zend Framework)?
我只是试着这个:$ po2php translations.po translations.php
,但这会导致一个我不明白的错误:po2php: warning: Couldn't handle input file translations.po: don't know what to do with input format .po, no template file
。
我不知道什么是模板文件是为什么我应该提供它?
更新:我也试过$ po2php translations.po translations.php -t messages.pot
,但这并没有帮助我,它显示几乎相同的错误:po2php: warning: Couldn't handle input file translations.po: don't know what to do with input format .po, template format .pot
。
为什么不使用Zend_Translate_Adapter_Gettext(http://framework.zend.com/manual/1.12/en/zend.translate.adapter.html)来使用.po /。 mo文件直接? –
这只是我正在研究的项目的一项要求。历史原因... – ragulka
对不起,不禁... :( –