Skip to content

Commit

Permalink
Merge pull request #142 from ernilambar/language-core-examples
Browse files Browse the repository at this point in the history
  • Loading branch information
swissspidy authored Feb 19, 2024
2 parents 5bd3067 + a75d6a1 commit 4551de1
Showing 1 changed file with 19 additions and 7 deletions.
26 changes: 19 additions & 7 deletions src/Core_Language_Command.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,23 +7,31 @@
*
* # Install the Dutch core language pack.
* $ wp language core install nl_NL
* Success: Language installed.
* 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 language core activate nl_NL
* $ 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 packages.
* # 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 | 2016-05-13 08:12:50 |
* | nl_NL | Dutch | Nederlands | installed | available | 2024-01-31 10:24:06 |
* +----------+--------------+-------------+-----------+-----------+---------------------+
*
* @package wp-cli
*/
class Core_Language_Command extends WP_CLI\CommandWithTranslation {
protected $obj_type = 'core';
Expand Down Expand Up @@ -173,9 +181,10 @@ public function is_installed( $args, $assoc_args = array() ) {
*
* # Install the Japanese language.
* $ wp language core install ja
* Downloading translation from https://downloads.wordpress.org/translation/core/4.9.8/ja.zip...
* Downloading translation from https://downloads.wordpress.org/translation/core/6.4.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.
Expand Down Expand Up @@ -237,6 +246,7 @@ public function install( $args, $assoc_args ) {
*
* ## EXAMPLES
*
* # Uninstall the Japanese core language pack.
* $ wp language core uninstall ja
* Success: Language uninstalled.
*
Expand Down Expand Up @@ -320,9 +330,10 @@ public function uninstall( $args, $assoc_args ) {
*
* ## EXAMPLES
*
* # Update installed core languages packs.
* $ 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...
* 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.
*
Expand All @@ -344,6 +355,7 @@ public function update( $args, $assoc_args ) { // phpcs:ignore Generic.CodeAnaly
*
* ## EXAMPLES
*
* # Activate the given language.
* $ wp language core activate ja
* Success: Language activated.
*
Expand Down

0 comments on commit 4551de1

Please sign in to comment.