我正在为 WordPress 博客使用 Tarski 主题。
我希望博客是法语的。
我查看了此页面 http://tarskitheme.com/help/localization/,但我可以'不了解如何使用 .POT 文件将其翻译成法语。
我下载了该文件并用 geany 打开它,进行了所有翻译,例如:
msgid "Search Results"
msgstr "Résultats de recherche
但是有人可以向我解释如何处理该文件吗?
我想我必须将其重命名为 tarski_3.0-fr_FR.pot,但是我该把它放在哪里呢?我必须以某种方式“编译”它吗?
谢谢大家。
编辑
看来我必须在这里问一个问题才能自己找到答案,我只是发现我必须从 .POT
http://en.wikipedia.org/wiki/GNU_gettext#Translated
但我仍然不知道该文件放在哪里......仍在搜索。
I'm using the Tarski theme for a wordpress blog.
I want the blog to be french.
I looked at this page http://tarskitheme.com/help/localisation/, but I can't catch up how to use the .POT file to translate it in french.
I downloaded the file and opened it with geany, made all the translation, ex:
msgid "Search Results"
msgstr "Résultats de recherche
But then can someone explain to me what to do with this file?
I suppose I have to rename it to tarski_3.0-fr_FR.pot, but then where do I put it? Do I have to "compile" it somehow?
Thank you all.
EDIT
It seems that I must ask a question here to find a answer by myself, I just find that I must generate .mo file from the .POT
http://en.wikipedia.org/wiki/GNU_gettext#Translating
But I'm still don't know where to put this file... still searching.
发布评论
评论(1)
您只需将 .mo 文件放入主题的根目录中,然后加载文本域即可。在您的情况下,最后一步已经完成:主题已经加载其文本域(functions.php 中的第 78 行,函数为 load_theme_textdomain)。
如果您想要使用 GUI 来编辑翻译并生成 .mo,请尝试 Poedit。
You simply drop the .mo file in the root directory of your theme, and load the text domain. In your case, this last step is already done: the theme already loads its text domains (line 78 in functions.php, the function is load_theme_textdomain).
If you'd like a GUI for editing your translation and generating the .mo, try Poedit.