wordpress icon indicating copy to clipboard operation
wordpress copied to clipboard

Add support for updating language packs for all installed languges in wp-fix-languages

Open nturbanov opened this issue 5 years ago • 2 comments

At the moment wp-fix-languages only installs language packs for the current active site language (set in General Settings). It does not install language packs for plugins and themes for all installed core languages.

When running multilingual sites (with or without Polylang) users have the ability to change their admin language. Plugins that have front end functionality also require language packs for multilingual support.

For instance, when running a site in Finnish (default) and Swedish via Polylang, wp-fix-languages currently only installs core, theme and plugin language packs for Finnish.

You can use wp eval 'array_keys(wp_get_installed_translations("core")["default"]);' to get an array of all installed language locales.

nturbanov avatar Mar 24 '20 12:03 nturbanov

This should also produce the list:

$ wp language core list --status=installed
+----------+--------------+-------------+-----------+--------+---------------------+
| language | english_name | native_name | status    | update | updated             |
+----------+--------------+-------------+-----------+--------+---------------------+
| fi       | Finnish      | Suomi       | installed | none   | 2020-05-24 09:39:32 |
| sv_SE    | Swedish      | Svenska     | installed | none   | 2020-05-22 22:23:36 |
+----------+--------------+-------------+-----------+--------+---------------------+

https://github.com/wp-cli/wp-cli/pull/1382/commits/f4922c3b5de1c84d8aa36295c651efe2ae24aca0

Our wp-fix-language already runs

wp language core update
wp language theme update --all
wp language plugin update --all

..which should cover the request you had. Apparently there are cases where it does not work.

Please send me by email info about that site it was so I can look deeper. Thanks!

ottok avatar May 28 '20 18:05 ottok

We have not been able to reproduce this issue, nor did we get futher information about it. We could look at this again when deprecating the wp-languages thing and when we anyway re-review the language pack installations of WordPress and plugins in #76

ottok avatar Jan 27 '21 13:01 ottok