Skip to content

Commit 4551de1

Browse files
authored
Merge pull request #142 from ernilambar/language-core-examples
2 parents 5bd3067 + a75d6a1 commit 4551de1

File tree

1 file changed

+19
-7
lines changed

1 file changed

+19
-7
lines changed

src/Core_Language_Command.php

Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,23 +7,31 @@
77
*
88
* # Install the Dutch core language pack.
99
* $ wp language core install nl_NL
10-
* Success: Language installed.
10+
* Downloading translation from https://downloads.wordpress.org/translation/core/6.4.3/nl_NL.zip...
11+
* Unpacking the update...
12+
* Installing the latest version...
13+
* Removing the old version of the translation...
14+
* Translation updated successfully.
15+
* Language 'nl_NL' installed.
16+
* Success: Installed 1 of 1 languages.
1117
*
1218
* # Activate the Dutch core language pack.
13-
* $ wp language core activate nl_NL
19+
* $ wp site switch-language nl_NL
1420
* Success: Language activated.
1521
*
1622
* # Uninstall the Dutch core language pack.
1723
* $ wp language core uninstall nl_NL
1824
* Success: Language uninstalled.
1925
*
20-
* # List installed core language packages.
26+
* # List installed core language packs.
2127
* $ wp language core list --status=installed
2228
* +----------+--------------+-------------+-----------+-----------+---------------------+
2329
* | language | english_name | native_name | status | update | updated |
2430
* +----------+--------------+-------------+-----------+-----------+---------------------+
25-
* | nl_NL | Dutch | Nederlands | installed | available | 2016-05-13 08:12:50 |
31+
* | nl_NL | Dutch | Nederlands | installed | available | 2024-01-31 10:24:06 |
2632
* +----------+--------------+-------------+-----------+-----------+---------------------+
33+
*
34+
* @package wp-cli
2735
*/
2836
class Core_Language_Command extends WP_CLI\CommandWithTranslation {
2937
protected $obj_type = 'core';
@@ -173,9 +181,10 @@ public function is_installed( $args, $assoc_args = array() ) {
173181
*
174182
* # Install the Japanese language.
175183
* $ wp language core install ja
176-
* Downloading translation from https://downloads.wordpress.org/translation/core/4.9.8/ja.zip...
184+
* Downloading translation from https://downloads.wordpress.org/translation/core/6.4.3/ja.zip...
177185
* Unpacking the update...
178186
* Installing the latest version...
187+
* Removing the old version of the translation...
179188
* Translation updated successfully.
180189
* Language 'ja' installed.
181190
* Success: Installed 1 of 1 languages.
@@ -237,6 +246,7 @@ public function install( $args, $assoc_args ) {
237246
*
238247
* ## EXAMPLES
239248
*
249+
* # Uninstall the Japanese core language pack.
240250
* $ wp language core uninstall ja
241251
* Success: Language uninstalled.
242252
*
@@ -320,9 +330,10 @@ public function uninstall( $args, $assoc_args ) {
320330
*
321331
* ## EXAMPLES
322332
*
333+
* # Update installed core languages packs.
323334
* $ wp language core update
324-
* Updating 'Japanese' translation for WordPress 4.9.2...
325-
* Downloading translation from https://downloads.wordpress.org/translation/core/4.9.2/ja.zip...
335+
* Updating 'Japanese' translation for WordPress 6.4.3...
336+
* Downloading translation from https://downloads.wordpress.org/translation/core/6.4.3/ja.zip...
326337
* Translation updated successfully.
327338
* Success: Updated 1/1 translation.
328339
*
@@ -344,6 +355,7 @@ public function update( $args, $assoc_args ) { // phpcs:ignore Generic.CodeAnaly
344355
*
345356
* ## EXAMPLES
346357
*
358+
* # Activate the given language.
347359
* $ wp language core activate ja
348360
* Success: Language activated.
349361
*

0 commit comments

Comments
 (0)