将 PO 文件编译为 PHP 翻译文件,适用于本地化插件或主题的国际化部署。
此命令在 WordPress 加载过程开始前的 before_wp_load 钩子中运行。
| 参数 | 说明 |
|---|---|
<source> |
现有 PO 文件或包含多个 PO 文件的目录的路径。 |
[<destination>] |
目标目录或生成的 PHP 文件的路径。默认为源目录。 |
$ wp i18n make-php .
Success: Created 3 files.
$ wp i18n make-php example-plugin-de_DE.po languages
Success: Created 1 file.