javascript - 使用 gettext 翻译 .js 文件

标签 javascript gettext poedit

我找到了这个很酷的 js gettext 库 -> http://code.google.com/p/gettext-js/但我不明白如何实现。我正在使用 poedit 编辑翻译,当我 checkout 项目并运行演示文件时,我可以看到它有效,但是当我更改文本时,.po 文件没有更新,我看不到新文本。有人知道吗?谢谢!

最佳答案

“我还必须在 gettext 命令中强制执行 python”:

  1. 文件|首选项|解析器
  2. 编辑 Python
  3. 编辑“扩展列表..”:
  4. *.py;*.js
  5. 编辑“解析器推荐:”
  6. xgettext --language=Python --force-po -o %o %C %K %F

完成。

感谢leading me有 Kentor :)

关于javascript - 使用 gettext 翻译 .js 文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2152451/

相关文章:

c - fputs( _ ("") ) 下划线代表什么?

android - EditText.getText().toString() 显示错误

javascript - 基于 Poedit 正则表达式的解析器?

javascript - 在 Chrome 上使用 Javascript 获取打印页面宽度/高度

javascript - document.createEvent 应该如何处理关键事件?

javascript - Sharepoint - 运行 Sp.Web.currentUser 属性

php - 什么 PHP 需要与 gettext 一起使用?

PHP-SQL - 国际化和本地化 - Gettext-POedit

zend-framework - poEdit 不创建源文件

javascript - Internet Explorer 中的数组长度因尾随逗号而异