Directory

wp i18n – WP-CLI Command | Developer.WordPress.org

wp i18n <command>

Provides internationalization tools for WordPress projects.

In this article

Examples

# Create a POT file for the WordPress plugin/theme in the current directory
$ wp i18n make-pot . languages/my-plugin.pot

Subcommands

NameDescription
wp i18n make-json

Extract JavaScript strings from PO files and add them to individual JSON files.

wp i18n make-mo

Create MO files from PO files.

wp i18n make-php

Create PHP files from PO files.

wp i18n make-pot

Create a POT file for a WordPress project.

wp i18n update-po

Update PO files from a POT file.

Command documentation is regenerated at every release. To add or update an example, please submit a pull request against the corresponding part of the codebase.