2017 © Pedro PelĂĄez
 

wp-cli-package language-command

Installs, activates, and manages language packs.

image

wp-cli/language-command

Installs, activates, and manages language packs.

  • Monday, July 30, 2018
  • by danielbachhuber
  • Repository
  • 4 Watchers
  • 6 Stars
  • 255,260 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 10 Forks
  • 8 Open issues
  • 13 Versions
  • 22 % Grown

The README.md

wp-cli/language-command

Installs, activates, and manages language packs., (*1)

Testing, (*2)

Quick links: Using | Installing | Contributing | Support, (*3)

Using

This package implements the following commands:, (*4)

wp language

Installs, activates, and manages language packs., (*5)

wp language

EXAMPLES, (*6)

# Install the Dutch core language pack.
$ wp language core install nl_NL
Downloading translation from https://downloads.wordpress.org/translation/core/6.4.3/nl_NL.zip...
Unpacking the update...
Installing the latest version...
Removing the old version of the translation...
Translation updated successfully.
Language 'nl_NL' installed.
Success: Installed 1 of 1 languages.

# Activate the Dutch core language pack.
$ wp site switch-language nl_NL
Success: Language activated.

# Install the Dutch theme language pack for Twenty Ten.
$ wp language theme install twentyten nl_NL
Downloading translation from https://downloads.wordpress.org/translation/theme/twentyten/4.0/nl_NL.zip...
Unpacking the update...
Installing the latest version...
Removing the old version of the translation...
Translation updated successfully.
Language 'nl_NL' installed.
Success: Installed 1 of 1 languages.

# Install the Dutch plugin language pack for Hello Dolly.
$ wp language plugin install hello-dolly nl_NL
Downloading translation from https://downloads.wordpress.org/translation/plugin/hello-dolly/1.7.2/nl_NL.zip...
Unpacking the update...
Installing the latest version...
Removing the old version of the translation...
Translation updated successfully.
Language 'nl_NL' installed.
Success: Installed 1 of 1 languages.

wp language core

Installs, activates, and manages core language packs., (*7)

wp language core

EXAMPLES, (*8)

# Install the Dutch core language pack.
$ wp language core install nl_NL
Downloading translation from https://downloads.wordpress.org/translation/core/6.4.3/nl_NL.zip...
Unpacking the update...
Installing the latest version...
Removing the old version of the translation...
Translation updated successfully.
Language 'nl_NL' installed.
Success: Installed 1 of 1 languages.

# Activate the Dutch core language pack.
$ wp site switch-language nl_NL
Success: Language activated.

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

# List installed core language packs.
$ wp language core list --status=installed
+----------+--------------+-------------+-----------+-----------+---------------------+
| language | english_name | native_name | status    | update    | updated             |
+----------+--------------+-------------+-----------+-----------+---------------------+
| nl_NL    | Dutch        | Nederlands  | installed | available | 2024-01-31 10:24:06 |
+----------+--------------+-------------+-----------+-----------+---------------------+

wp language core activate

Activates a given language., (*9)

wp language core activate <language>

Warning: wp language core activate is deprecated. Use wp site switch-language instead., (*10)

OPTIONS, (*11)

<language>
    Language code to activate.

EXAMPLES, (*12)

# Activate the given language.
$ wp language core activate ja
Success: Language activated.

wp language core is-installed

Checks if a given language is installed., (*13)

wp language core is-installed <language>

Returns exit code 0 when installed, 1 when uninstalled., (*14)

OPTIONS, (*15)

<language>
    The language code to check.

EXAMPLES, (*16)

# 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., (*17)

wp language core install <language>... [--activate]

Downloads the language pack from WordPress.org. Find your language code at: https://translate.wordpress.org/, (*18)

OPTIONS, (*19)

<language>...
    Language code to install.

[--activate]
    If set, the language will be activated immediately after install.

EXAMPLES, (*20)

# Install the Brazilian Portuguese language.
$ wp language core install pt_BR
Downloading translation from https://downloads.wordpress.org/translation/core/6.5/pt_BR.zip...
Unpacking the update...
Installing the latest version...
Removing the old version of the translation...
Translation updated successfully.
Language 'pt_BR' installed.
Success: Installed 1 of 1 languages.

wp language core list

Lists all available languages., (*21)

wp language core list [--field=<field>] [--<field>=<value>] [--fields=<fields>] [--format=<format>]

OPTIONS, (*22)

[--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
    options:
      - table
      - csv
      - json
      - count
    ---

AVAILABLE FIELDS, (*23)

These fields will be displayed by default for each translation:, (*24)

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

EXAMPLES, (*25)

# 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 uninstall

Uninstalls a given language., (*26)

wp language core uninstall <language>...

OPTIONS, (*27)

<language>...
    Language code to uninstall.

EXAMPLES, (*28)

# Uninstall the Japanese core language pack.
$ wp language core uninstall ja
Success: Language uninstalled.

wp language core update

Updates installed languages for core., (*29)

wp language core update [--dry-run]

OPTIONS, (*30)

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

EXAMPLES, (*31)

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

wp language plugin

Installs, activates, and manages plugin language packs., (*32)

wp language plugin

EXAMPLES, (*33)

# Install the Dutch plugin language pack for Hello Dolly.
$ wp language plugin install hello-dolly nl_NL
Downloading translation from https://downloads.wordpress.org/translation/plugin/hello-dolly/1.7.2/nl_NL.zip...
Unpacking the update...
Installing the latest version...
Removing the old version of the translation...
Translation updated successfully.
Language 'nl_NL' installed.
Success: Installed 1 of 1 languages.

# Uninstall the Dutch plugin language pack for Hello Dolly.
$ wp language plugin uninstall hello-dolly nl_NL
Language 'nl_NL' for 'hello-dolly' uninstalled.
+-------------+--------+-------------+
| name        | locale | status      |
+-------------+--------+-------------+
| hello-dolly | nl_NL  | uninstalled |
+-------------+--------+-------------+
Success: Uninstalled 1 of 1 languages.

# List installed plugin language packs for Hello Dolly.
$ wp language plugin list hello-dolly --status=installed
+-------------+----------+--------------+-------------+-----------+--------+---------------------+
| plugin      | language | english_name | native_name | status    | update | updated             |
+-------------+----------+--------------+-------------+-----------+--------+---------------------+
| hello-dolly | nl_NL    | Dutch        | Nederlands  | installed | none   | 2023-11-13 12:34:15 |
+-------------+----------+--------------+-------------+-----------+--------+---------------------+

wp language plugin is-installed

Checks if a given language is installed., (*34)

wp language plugin is-installed <plugin> <language>...

Returns exit code 0 when installed, 1 when uninstalled., (*35)

OPTIONS, (*36)

<plugin>
    Plugin to check for.

<language>...
    The language code to check.

EXAMPLES, (*37)

# 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., (*38)

wp language plugin install [<plugin>] [--all] <language>... [--format=<format>]

Downloads the language pack from WordPress.org., (*39)

OPTIONS, (*40)

[<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
    options:
      - table
      - csv
      - json
      - summary
    ---

EXAMPLES, (*41)

# 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...
Removing the old version of the translation...
Translation updated successfully.
Language 'ja' installed.
Success: Installed 1 of 1 languages.

wp language plugin list

Lists all available languages for one or more plugins., (*42)

wp language plugin list [<plugin>...] [--all] [--field=<field>] [--<field>=<value>] [--fields=<fields>] [--format=<format>]

OPTIONS, (*43)

[<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
    options:
      - table
      - csv
      - json
      - count
    ---

AVAILABLE FIELDS, (*44)

These fields will be displayed by default for each translation:, (*45)

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

EXAMPLES, (*46)

# List available language packs for the plugin.
$ wp language plugin list hello-dolly --fields=language,english_name,status
+----------------+-------------------------+-------------+
| language       | english_name            | status      |
+----------------+-------------------------+-------------+
| ar             | Arabic                  | uninstalled |
| ary            | Moroccan Arabic         | uninstalled |
| az             | Azerbaijani             | uninstalled |

wp language plugin uninstall

Uninstalls a given language for a plugin., (*47)

wp language plugin uninstall [<plugin>] [--all] <language>... [--format=<format>]

OPTIONS, (*48)

[<plugin>]
    Plugin to uninstall language for.

[--all]
    If set, languages for all plugins will be uninstalled.

<language>...
    Language code to uninstall.

[--format=<format>]
    Render output in a particular format. Used when installing languages for all plugins.
    ---
    default: table
    options:
      - table
      - csv
      - json
      - summary
    ---

EXAMPLES, (*49)

# Uninstall the Japanese plugin language pack for Hello Dolly.
$ wp language plugin uninstall hello-dolly ja
Language 'ja' for 'hello-dolly' uninstalled.
+-------------+--------+-------------+
| name        | locale | status      |
+-------------+--------+-------------+
| hello-dolly | ja     | uninstalled |
+-------------+--------+-------------+
Success: Uninstalled 1 of 1 languages.

wp language plugin update

Updates installed languages for one or more plugins., (*50)

wp language plugin update [<plugin>...] [--all] [--dry-run]

OPTIONS, (*51)

[<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, (*52)

# Update all installed language packs for all plugins.
$ 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

Installs, activates, and manages theme language packs., (*53)

wp language theme

EXAMPLES, (*54)

# Install the Dutch theme language pack for Twenty Ten.
$ wp language theme install twentyten nl_NL
Downloading translation from https://downloads.wordpress.org/translation/theme/twentyten/4.0/nl_NL.zip...
Unpacking the update...
Installing the latest version...
Removing the old version of the translation...
Translation updated successfully.
Language 'nl_NL' installed.
Success: Installed 1 of 1 languages.

# Uninstall the Dutch theme language pack for Twenty Ten.
$ wp language theme uninstall twentyten nl_NL
Language 'nl_NL' for 'twentyten' uninstalled.
+-----------+--------+-------------+
| name      | locale | status      |
+-----------+--------+-------------+
| twentyten | nl_NL  | uninstalled |
+-----------+--------+-------------+
Success: Uninstalled 1 of 1 languages.

# List installed theme language packs for Twenty Ten.
$ wp language theme list twentyten --status=installed
+-----------+----------+--------------+-------------+-----------+--------+---------------------+
| theme     | language | english_name | native_name | status    | update | updated             |
+-----------+----------+--------------+-------------+-----------+--------+---------------------+
| twentyten | nl_NL    | Dutch        | Nederlands  | installed | none   | 2023-12-29 21:21:39 |
+-----------+----------+--------------+-------------+-----------+--------+---------------------+

wp language theme is-installed

Checks if a given language is installed., (*55)

wp language theme is-installed <theme> <language>...

Returns exit code 0 when installed, 1 when uninstalled., (*56)

OPTIONS, (*57)

<theme>
    Theme to check for.

<language>...
    The language code to check.

EXAMPLES, (*58)

# 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., (*59)

wp language theme install [<theme>] [--all] <language>... [--format=<format>]

Downloads the language pack from WordPress.org., (*60)

OPTIONS, (*61)

[<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
    options:
      - table
      - csv
      - json
      - summary
    ---

EXAMPLES, (*62)

# 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 list

Lists all available languages for one or more themes., (*63)

wp language theme list [<theme>...] [--all] [--field=<field>] [--<field>=<value>] [--fields=<fields>] [--format=<format>]

OPTIONS, (*64)

[<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
    options:
      - table
      - csv
      - json
      - count
    ---

AVAILABLE FIELDS, (*65)

These fields will be displayed by default for each translation:, (*66)

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

EXAMPLES, (*67)

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

wp language theme uninstall

Uninstalls a given language for a theme., (*68)

wp language theme uninstall [<theme>] [--all] <language>... [--format=<format>]

OPTIONS, (*69)

[<theme>]
    Theme to uninstall language for.

[--all]
    If set, languages for all themes will be uninstalled.

<language>...
    Language code to uninstall.

[--format=<format>]
    Render output in a particular format. Used when installing languages for all themes.
    ---
    default: table
    options:
      - table
      - csv
      - json
      - summary
    ---

EXAMPLES, (*70)

# Uninstall the Japanese theme language pack for Twenty Ten.
$ wp language theme uninstall twentyten ja
Language 'ja' for 'twentyten' uninstalled.
+-----------+--------+-------------+
| name      | locale | status      |
+-----------+--------+-------------+
| twentyten | ja     | uninstalled |
+-----------+--------+-------------+
Success: Uninstalled 1 of 1 languages.

wp language theme update

Updates installed languages for one or more themes., (*71)

wp language theme update [<theme>...] [--all] [--dry-run]

OPTIONS, (*72)

[<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, (*73)

# Update all installed language packs for all themes.
$ 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.

wp site switch-language

Activates a given language., (*74)

wp site switch-language <language>

OPTIONS, (*75)

<language>
    Language code to activate.

EXAMPLES, (*76)

$ wp site switch-language ja
Success: Language activated.

Installing

This package is included with WP-CLI itself, no additional installation necessary., (*77)

To install the latest version of this package over what's included in WP-CLI, run:, (*78)

wp package install git@github.com:wp-cli/language-command.git

Contributing

We appreciate you taking the initiative to contribute to this project., (*79)

Contributing isn’t limited to just code. We encourage you to contribute in the way that best fits your abilities, by writing tutorials, giving a demo at your local meetup, helping other users with their support questions, or revising our documentation., (*80)

For a more thorough introduction, check out WP-CLI's guide to contributing. This package follows those policy and guidelines., (*81)

Reporting a bug

Think you’ve found a bug? We’d love for you to help us get it fixed., (*82)

Before you create a new issue, you should search existing issues to see if there’s an existing resolution to it, or if it’s already been fixed in a newer version., (*83)

Once you’ve done a bit of searching and discovered there isn’t an open or fixed issue for your bug, please create a new issue. Include as much detail as you can, and clear steps to reproduce if possible. For more guidance, review our bug report documentation., (*84)

Creating a pull request

Want to contribute a new feature? Please first open a new issue to discuss whether the feature is a good fit for the project., (*85)

Once you've decided to commit the time to seeing your pull request through, please follow our guidelines for creating a pull request to make sure it's a pleasant experience. See "Setting up" for details specific to working on this package locally., (*86)

Support

GitHub issues aren't for general support questions, but there are other venues you can try: https://wp-cli.org/#support, (*87)

This README.md is generated dynamically from the project's codebase using wp scaffold package-readme (doc). To suggest changes, please submit a pull request against the corresponding part of the codebase., (*88)

The Versions

30/07 2018

dev-wip-plugin-theme-command

dev-wip-plugin-theme-command https://github.com/wp-cli/language-command

Installs, activates, and manages language packs.

  Sources   Download

MIT

The Development Requires

20/07 2018

dev-master

9999999-dev https://github.com/wp-cli/language-command

Installs, activates, and manages language packs.

  Sources   Download

MIT

The Development Requires

20/04 2018

dev-refresh-scaffold-files

dev-refresh-scaffold-files https://github.com/wp-cli/language-command

Installs, activates, and manages language packs.

  Sources   Download

MIT

The Development Requires

25/01 2018

dev-revert-21-plugin-theme-command

dev-revert-21-plugin-theme-command https://github.com/wp-cli/language-command

Installs, activates, and manages language packs.

  Sources   Download

MIT

The Development Requires

22/01 2018

dev-plugin-theme-command

dev-plugin-theme-command https://github.com/wp-cli/language-command

Installs, activates, and manages language packs.

  Sources   Download

MIT

The Development Requires

08/12 2017

v1.0.6

1.0.6.0 https://github.com/wp-cli/language-command

Installs, activates, and manages language packs.

  Sources   Download

MIT

The Development Requires

21/11 2017

v1.0.5

1.0.5.0 https://github.com/wp-cli/language-command

Manage language packs.

  Sources   Download

MIT

The Development Requires

17/11 2017

dev-update-tests-enable-error-reporting

dev-update-tests-enable-error-reporting https://github.com/wp-cli/language-command

Manage language packs.

  Sources   Download

MIT

The Development Requires

29/09 2017

v1.0.4

1.0.4.0 https://github.com/wp-cli/language-command

Manage language packs.

  Sources   Download

MIT

The Development Requires

05/08 2017

v1.0.3

1.0.3.0 https://github.com/wp-cli/language-command

Manage language packs.

  Sources   Download

MIT

The Development Requires

30/05 2017

v1.0.2

1.0.2.0 https://github.com/wp-cli/language-command

Manage language packs.

  Sources   Download

MIT

The Development Requires

01/05 2017

v1.0.1

1.0.1.0 https://github.com/wp-cli/language-command

Manage language packs.

  Sources   Download

MIT

The Development Requires

18/04 2017

v1.0.0

1.0.0.0 https://github.com/wp-cli/language-command

Manage language packs.

  Sources   Download

MIT

The Development Requires