You've installed Wordpress in a language and want to switch to another one, or give the user the freedom to choose.
Use WP-CLI to do the job.
- Ubuntu 18.04
- Wordpress 5.3.2
Install WP-CLI (PHP-CLI package is a requirement)
sudo apt-install php-cli curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar chmod +x wp-cli.phar sudo mv wp-cli.phar /usr/local/bin/wp wp --info
List available languages to get the code:
wp language core list
Add a core language:
wp language core list wp language core install pt_BR wp site switch-language pt_BR
To update all downloaded languages:
wp language core update