我正在嘗試使用po2php將我的.po文件轉換爲Zend php翻譯數組。 我只是試着這個:$ po2php translations.po translations.php,但這會導致一個我不明白的錯誤:po2php: warning: Couldn't handle input file translations.po: don't know what to do with input for
當我嘗試在django模板中翻譯空字符串時,最終顯示的是po標題,而不是空字符串http://codex.wordpress.org/Translating_WordPress#The_PO_File_Header。 我必須翻譯空字符串,因爲它們是在db中我無法填充所有模型並將它們翻譯爲動態。 現在我使用類似 {% if data %}
{% trans data %}
{% endi