1

我从以下网址下载了 I18n 生成器包:http ://codex.wordpress.org/I18n_for_WordPress_Developers#Generating_a_POT_file 。我现在想为我创建的模板生成一个 pot 文件:

php makepot.php  /home/mr/workspace/blog/wp-content/themes/myTheme/ de_DE.pot

执行此命令后,我得到一个 de_DE.pot,其中包含一些 WP 标准密钥。但是找不到我的新密钥。但如果我手动将它们添加到文件中并上传,它们将被翻译。为什么 WordPress 不获取我所有的密钥?

4

1 回答 1

1

I have used the poEdit in the following way.

  1. File Menu > New Catalog
  2. Set the language as per your need. Set utf8
  3. Set the paths as . and ..(if you want to place your .mo file at languages folder).
  4. Define the functions from which the strings to take( ie , _, _e, _n, _x, _ex etc).
  5. Now save the file to your template's folder as templateName.po
  6. Now update catalog.
  7. Upon saving the .mo file will be generated in the same folder.
  8. Now rename the .mo file to the specific Locale (for mine bn_BD.mo, for your case de_DE.mo)

I would suggest a few tips from here

于 2012-12-09T16:12:03.907 回答