wp language

Installs, activates, and manages language packs.

Commands Description
wp language core list Lists all available languages.
wp language core is-installed Checks if a given language is installed.
wp language core install Installs a given language.
wp language core uninstall Uninstalls a given language.
wp language core update Updates installed languages for core.
wp language core activate Activates a given language.
wp language plugin list Lists all available languages for one or more plugins.
wp language plugin is-installed Checks if a given language is installed.
wp language plugin install Installs a given language for a plugin.
wp language plugin uninstall Uninstalls a given language for a plugin.
wp language plugin update Updates installed languages for one or more plugins.
wp language theme list Lists all available languages for one or more themes.
wp language theme is-installed Checks if a given language is installed.
wp language theme install Installs a given language for a theme.
wp language theme uninstall Uninstalls a given language for a theme.
wp language theme update Updates installed languages for one or more themes.

Examples

wp language core

# Install the Dutch core language pack.
$ wp language core install nl_NL
Success: Language installed.

# Activate the Dutch core language pack.
$ wp language core activate nl_NL
Success: Language activated.

# Uninstall the Dutch core language pack.
$ wp language core uninstall nl_NL
Success: Language uninstalled.

# List installed core language packages.
$ wp language core list --status=installed
+----------+--------------+-------------+-----------+-----------+---------------------+
| language | english_name | native_name | status    | update    | updated             |
+----------+--------------+-------------+-----------+-----------+---------------------+
| nl_NL    | Dutch        | Nederlands  | installed | available | 2016-05-13 08:12:50 |
+----------+--------------+-------------+-----------+-----------+---------------------+

wp language theme

# Install the Dutch language pack for Twenty Seventeen.
$ wp language theme install twentyseventeen nl_NL
Success: Language installed.

wp language plugin

# Install the Dutch language pack for Akismet.
$ wp language plugin install akismet nl_NL
Success: Language installed.

Source code of the commands


wp language core list

Lists all available languages.

Usage

wp language core list [--field={field}] [--{field}={value}] [--fields={fields}] [--format={format}]

You can specify global options and the following:

[--field={field}]
Display the value of a single field
[--{field}={value}]
Filter results by key=value pairs.
[--fields={fields}]
Limit the output to specific fields.
[--format={format}]

Render output in a particular format.
Default: table
Can be:

  • table
  • csv
  • json

Available fields

These fields will be displayed by default for each translation:

  • language
  • english_name
  • native_name
  • status
  • update
  • updated

Examples

# List language,english_name,status fields of available languages.
$ wp language core list --fields=language,english_name,status
+----------------+-------------------------+-------------+
| language       | english_name            | status      |
+----------------+-------------------------+-------------+
| ar             | Arabic                  | uninstalled |
| ary            | Moroccan Arabic         | uninstalled |
| az             | Azerbaijani             | uninstalled |

wp language core is-installed

Checks if a given language is installed.

Returns exit code 0 when installed, 1 when uninstalled.

Usage

wp language core is-installed {language}

You can specify global options and the following:

{language}
The language code to check.

Examples

# Check whether the German language is installed; exit status 0 if installed, otherwise 1.
$ wp language core is-installed de_DE
$ echo $?
1

wp language core install

Installs a given language.

Downloads the language pack from WordPress.org.

Usage

wp language core install {language}... [--activate]

You can specify global options and the following:

{language}...
Language code to install.
[--activate]
If set, the language will be activated immediately after install.

Examples

# Install the Japanese language.
$ wp language core install ja
Downloading translation from https://downloads.wordpress.org/translation/core/4.9.8/ja.zip...
Unpacking the update...
Installing the latest version...
Translation updated successfully.
Language 'ja' installed.
Success: Installed 1 of 1 languages.

wp language core uninstall

Uninstalls a given language.

Usage

wp language core uninstall {language}...

You can specify global options and the following:

{language}...
Language code to uninstall.

Examples

$ wp language core uninstall ja
Success: Language uninstalled.

wp language core update

Updates installed languages for core.

Usage

wp language core update [--dry-run]

You can specify global options and the following:

[--dry-run]
Preview which translations would be updated.

Examples

$ wp language core update
Updating 'Japanese' translation for WordPress 4.9.2...
Downloading translation from https://downloads.wordpress.org/translation/core/4.9.2/ja.zip...
Translation updated successfully.
Success: Updated 1/1 translation.

wp language core activate

Activates a given language.

Usage

wp language core activate {language}

You can specify global options and the following:

{language}
Language code to activate.

Examples

$ wp language core activate ja
Success: Language activated.

wp language plugin list

Lists all available languages for one or more plugins.

Usage

wp language plugin list [{plugin}...] [--all] [--field={field}] [--{field}={value}] [--fields={fields}] [--format={format}]

You can specify global options and the following:

[{plugin}...]
One or more plugins to list languages for.
[--all]
If set, available languages for all plugins will be listed.
[--field={field}]
Display the value of a single field.
[--{field}={value}]
Filter results by key=value pairs.
[--fields={fields}]
Limit the output to specific fields.
[--format={format}]

Render output in a particular format.
Default: table
Can be:

  • table
  • csv
  • json

Available fields

These fields will be displayed by default for each translation:

  • plugin
  • language
  • english_name
  • native_name
  • status
  • update
  • updated

Examples

# List language,english_name,status fields of available languages.
$ wp language plugin list --fields=language,english_name,status
+----------------+-------------------------+-------------+
| language       | english_name            | status      |
+----------------+-------------------------+-------------+
| ar             | Arabic                  | uninstalled |
| ary            | Moroccan Arabic         | uninstalled |
| az             | Azerbaijani             | uninstalled |

wp language plugin is-installed

Checks if a given language is installed.

Returns exit code 0 when installed, 1 when uninstalled.

Usage

wp language plugin is-installed {plugin} {language}...

You can specify global options and the following:

{plugin}
Plugin to check for.
{language}...
The language code to check.

Examples

# Check whether the German language is installed for Akismet; exit status 0 if installed, otherwise 1.
$ wp language plugin is-installed akismet de_DE
$ echo $?
1

wp language plugin install

Installs a given language for a plugin.

Downloads the language pack from WordPress.org.

Usage

wp language plugin install [{plugin}] [--all] {language}... [--format={format}]

You can specify global options and the following:

[{plugin}]
Plugin to install language for.
[--all]
If set, languages for all plugins will be installed.
{language}...
Language code to install.
[--format={format}]

Render output in a particular format. Used when installing languages for all plugins.
Default: table
Can be:

  • table
  • csv
  • json
  • summary

Examples

# Install the Japanese language for Akismet.
$ wp language plugin install akismet ja
Downloading translation from https://downloads.wordpress.org/translation/plugin/akismet/4.0.3/ja.zip...
Unpacking the update...
Installing the latest version...
Translation updated successfully.
Language 'ja' installed.
Success: Installed 1 of 1 languages.

wp language plugin uninstall

Uninstalls a given language for a plugin.

Usage

wp language plugin uninstall {plugin} {language}...

You can specify global options and the following:

{plugin}
Plugin to uninstall language for.
{language}...
Language code to uninstall.

Examples

$ wp language plugin uninstall hello-dolly ja
Success: Language uninstalled.

wp language plugin update

Updates installed languages for one or more plugins.

Usage

wp language plugin update [{plugin}...] [--all] [--dry-run]

You can specify global options and the following:

[{plugin}...]
One or more plugins to update languages for.
[--all]
If set, languages for all plugins will be updated.
[--dry-run]
Preview which translations would be updated.

Examples

$ wp language plugin update --all
Updating 'Japanese' translation for Akismet 3.1.11...
Downloading translation from https://downloads.wordpress.org/translation/plugin/akismet/3.1.11/ja.zip...
Translation updated successfully.
Success: Updated 1/1 translation.

wp language theme list

Lists all available languages for one or more themes.

Usage

wp language theme list [{theme}...] [--all] [--field={field}] [--{field}={value}] [--fields={fields}] [--format={format}]

You can specify global options and the following:

[{theme}...]
One or more themes to list languages for.
[--all]
If set, available languages for all themes will be listed.
[--field={field}]
Display the value of a single field.
[--{field}={value}]
Filter results by key=value pairs.
[--fields={fields}]
Limit the output to specific fields.
[--format={format}]

Render output in a particular format.
Default: table
Can be:

  • table
  • csv
  • json

Available fields

These fields will be displayed by default for each translation:

  • theme
  • language
  • english_name
  • native_name
  • status
  • update
  • updated

Examples

# List language,english_name,status fields of available languages.
$ wp language theme list --fields=language,english_name,status
+----------------+-------------------------+-------------+
| language       | english_name            | status      |
+----------------+-------------------------+-------------+
| ar             | Arabic                  | uninstalled |
| ary            | Moroccan Arabic         | uninstalled |
| az             | Azerbaijani             | uninstalled |

wp language theme is-installed

Checks if a given language is installed.

Returns exit code 0 when installed, 1 when uninstalled.

Usage

wp language theme is-installed {theme} {language}...

You can specify global options and the following:

{theme}
Theme to check for.
{language}...
The language code to check.

Examples

# Check whether the German language is installed for Twenty Seventeen; exit status 0 if installed, otherwise 1.
$ wp language theme is-installed twentyseventeen de_DE
$ echo $?
1

wp language theme install

Installs a given language for a theme.

Downloads the language pack from WordPress.org.

Usage

wp language theme install [{theme}] [--all] {language}... [--format={format}]

You can specify global options and the following:

[{theme}]
Theme to install language for.
[--all]
If set, languages for all themes will be installed.
{language}...
Language code to install.
[--format={format}]

Render output in a particular format. Used when installing languages for all themes.
Default: table
Can be:

  • table
  • csv
  • json
  • summary

Examples

# Install the Japanese language for Twenty Seventeen.
$ wp language theme install twentyseventeen ja
Downloading translation from https://downloads.wordpress.org/translation/theme/twentyseventeen/1.3/ja.zip...
Unpacking the update...
Installing the latest version...
Translation updated successfully.
Language 'ja' installed.
Success: Installed 1 of 1 languages.

wp language theme uninstall

Uninstalls a given language for a theme.

Usage

wp language theme uninstall {theme} {language}...

You can specify global options and the following:

{theme}
Theme to uninstall language for.
{language}...
Language code to uninstall.

Examples

$ wp language theme uninstall twentyten ja
Success: Language uninstalled.

wp language theme update

Updates installed languages for one or more themes.

Usage

wp language theme update [{theme}...] [--all] [--dry-run]

You can specify global options and the following:

[{theme}...]
One or more themes to update languages for.
[--all]
If set, languages for all themes will be updated.
[--dry-run]
Preview which translations would be updated.

Examples

$ wp language theme update --all
Updating 'Japanese' translation for Twenty Fifteen 1.5...
Downloading translation from https://downloads.wordpress.org/translation/theme/twentyfifteen/1.5/ja.zip...
Translation updated successfully.
Success: Updated 1/1 translation.