Skip to content
YanQS edited this page Dec 13, 2025 · 1 revision

国际化 (i18n)

提取字符串

  • 使用 WordPress i18n 工具或简单的脚本查找 __(), _e(), _x() 等函数调用并提取 msgid

更新翻译

  • .po 文件位于 languages/。更新 languages/wp-comment-notify-en_US.po 后,可用 Poedit 编辑或手动修改。

生成 .mo

  • 使用 msgfmt(gettext 工具链):

msgfmt -o languages/wp-comment-notify-en_US.mo languages/wp-comment-notify-en_US.po

或使用 WP-CLI 的 i18n 命令(若可用)。

注意事项

  • 保持占位符(如 %s%d)与原文一致。
  • 更新 .pot(如果你维护 POT),并把 .po 同步到翻译平台或提交 PR。

主页 (Home)中文English

安装与升级 (Installation and Upgrade)中文English

模板与样式 (Templates and Style)中文English

日志与Cron (logs&cron)中文English

国际化 (Localization)中文English

变更日志 (Changelog)中文English

Clone this wiki locally