Installs, activates, and manages language packs.
Quick links: Using | Installing | Contributing | Support
This package implements the following commands:
Installs, activates, and manages language packs.
fin language
EXAMPLES
# Install the Dutch core language pack.
$ fin 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.
$ fin site switch-language nl_NL
Success: Language activated.
# Install the Dutch theme language pack for Twenty Ten.
$ fin 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.
$ fin 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.
Installs, activates, and manages core language packs.
fin language core
EXAMPLES
# Install the Dutch core language pack.
$ fin 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.
$ fin site switch-language nl_NL
Success: Language activated.
# Uninstall the Dutch core language pack.
$ fin language core uninstall nl_NL
Success: Language uninstalled.
# List installed core language packs.
$ fin 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 |
+----------+--------------+-------------+-----------+-----------+---------------------+
Activates a given language.
fin language core activate <language>
Warning: fin language core activate
is deprecated. Use fin site switch-language
instead.
OPTIONS
<language>
Language code to activate.
EXAMPLES
# Activate the given language.
$ fin language core activate ja
Success: Language activated.
Checks if a given language is installed.
fin language core is-installed <language>
Returns exit code 0 when installed, 1 when uninstalled.
OPTIONS
<language>
The language code to check.
EXAMPLES
# Check whether the German language is installed; exit status 0 if installed, otherwise 1.
$ fin language core is-installed de_DE
$ echo $?
1
Installs a given language.
fin language core install <language>... [--activate]
Downloads the language pack from WordPress.org. Find your language code at: https://translate.wordpress.org/
OPTIONS
<language>...
Language code to install.
[--activate]
If set, the language will be activated immediately after install.
EXAMPLES
# Install the Brazilian Portuguese language.
$ fin 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.
Lists all available languages.
fin language core list [--field=<field>] [--<field>=<value>] [--fields=<fields>] [--format=<format>]
OPTIONS
[--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
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.
$ fin language core list --fields=language,english_name,status
+----------------+-------------------------+-------------+
| language | english_name | status |
+----------------+-------------------------+-------------+
| ar | Arabic | uninstalled |
| ary | Moroccan Arabic | uninstalled |
| az | Azerbaijani | uninstalled |
Uninstalls a given language.
fin language core uninstall <language>...
OPTIONS
<language>...
Language code to uninstall.
EXAMPLES
# Uninstall the Japanese core language pack.
$ fin language core uninstall ja
Success: Language uninstalled.
Updates installed languages for core.
fin language core update [--dry-run]
OPTIONS
[--dry-run]
Preview which translations would be updated.
EXAMPLES
# Update installed core languages packs.
$ fin 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.
Installs, activates, and manages plugin language packs.
fin language plugin
EXAMPLES
# Install the Dutch plugin language pack for Hello Dolly.
$ fin 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.
$ fin 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.
$ fin 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 |
+-------------+----------+--------------+-------------+-----------+--------+---------------------+
Checks if a given language is installed.
fin language plugin is-installed <plugin> <language>...
Returns exit code 0 when installed, 1 when uninstalled.
OPTIONS
<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.
$ fin language plugin is-installed akismet de_DE
$ echo $?
1
Installs a given language for a plugin.
fin language plugin install [<plugin>] [--all] <language>... [--format=<format>]
Downloads the language pack from WordPress.org.
OPTIONS
[<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
# Install the Japanese language for Akismet.
$ fin 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.
Lists all available languages for one or more plugins.
fin language plugin list [<plugin>...] [--all] [--field=<field>] [--<field>=<value>] [--fields=<fields>] [--format=<format>]
OPTIONS
[<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
These fields will be displayed by default for each translation:
- plugin
- language
- english_name
- native_name
- status
- update
- updated
EXAMPLES
# List available language packs for the plugin.
$ fin language plugin list hello-dolly --fields=language,english_name,status
+----------------+-------------------------+-------------+
| language | english_name | status |
+----------------+-------------------------+-------------+
| ar | Arabic | uninstalled |
| ary | Moroccan Arabic | uninstalled |
| az | Azerbaijani | uninstalled |
Uninstalls a given language for a plugin.
fin language plugin uninstall [<plugin>] [--all] <language>... [--format=<format>]
OPTIONS
[<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
# Uninstall the Japanese plugin language pack for Hello Dolly.
$ fin 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.
Updates installed languages for one or more plugins.
fin language plugin update [<plugin>...] [--all] [--dry-run]
OPTIONS
[<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
# Update all installed language packs for all plugins.
$ fin 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.
Installs, activates, and manages theme language packs.
fin language theme
EXAMPLES
# Install the Dutch theme language pack for Twenty Ten.
$ fin 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.
$ fin 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.
$ fin 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 |
+-----------+----------+--------------+-------------+-----------+--------+---------------------+
Checks if a given language is installed.
fin language theme is-installed <theme> <language>...
Returns exit code 0 when installed, 1 when uninstalled.
OPTIONS
<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.
$ fin language theme is-installed twentyseventeen de_DE
$ echo $?
1
Installs a given language for a theme.
fin language theme install [<theme>] [--all] <language>... [--format=<format>]
Downloads the language pack from WordPress.org.
OPTIONS
[<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
# Install the Japanese language for Twenty Seventeen.
$ fin 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.
Lists all available languages for one or more themes.
fin language theme list [<theme>...] [--all] [--field=<field>] [--<field>=<value>] [--fields=<fields>] [--format=<format>]
OPTIONS
[<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
These fields will be displayed by default for each translation:
- theme
- language
- english_name
- native_name
- status
- update
- updated
EXAMPLES
# List available language packs for the theme.
$ fin language theme list twentyten --fields=language,english_name,status
+----------------+-------------------------+-------------+
| language | english_name | status |
+----------------+-------------------------+-------------+
| ar | Arabic | uninstalled |
| ary | Moroccan Arabic | uninstalled |
| az | Azerbaijani | uninstalled |
Uninstalls a given language for a theme.
fin language theme uninstall [<theme>] [--all] <language>... [--format=<format>]
OPTIONS
[<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
# Uninstall the Japanese theme language pack for Twenty Ten.
$ fin language theme uninstall twentyten ja
Language 'ja' for 'twentyten' uninstalled.
+-----------+--------+-------------+
| name | locale | status |
+-----------+--------+-------------+
| twentyten | ja | uninstalled |
+-----------+--------+-------------+
Success: Uninstalled 1 of 1 languages.
Updates installed languages for one or more themes.
fin language theme update [<theme>...] [--all] [--dry-run]
OPTIONS
[<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
# Update all installed language packs for all themes.
$ fin 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.
Activates a given language.
fin site switch-language <language>
OPTIONS
<language>
Language code to activate.
EXAMPLES
$ fin site switch-language ja
Success: Language activated.
This package is included with FIN-CLI itself, no additional installation necessary.
To install the latest version of this package over what's included in FIN-CLI, run:
fin package install git@github.com:fin-cli/language-command.git
We appreciate you taking the initiative to contribute to this project.
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.
For a more thorough introduction, check out FIN-CLI's guide to contributing. This package follows those policy and guidelines.
Think you’ve found a bug? We’d love for you to help us get it fixed.
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.
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.
Want to contribute a new feature? Please first open a new issue to discuss whether the feature is a good fit for the project.
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.
GitHub issues aren't for general support questions, but there are other venues you can try: https://fin-cli.org/#support
This README.md is generated dynamically from the project's codebase using fin scaffold package-readme
(doc). To suggest changes, please submit a pull request against the corresponding part of the codebase.