Languages and locale

Originally: Download as default (en_US) then install languages then apply locale

Because en_US is always available for the latest wordpress version this is a safe choice for deploying upgrades

  1. Install wordpress without a locale
    Instead of wp core download --locale="{{ LOCALE }}" this could be wp core download as the default is en_US
  shell: wp {{ cli_args }} core download
          --version="{{ WP_VERSION }}"
          --skip-content --force
  1. Test: See if wordpress.site.locale is included in wordpress.site.languages

  2. Install all languages

shell: wp {{ cli_args }} core language install {{ item }}
with_items: "{{ wordpress.site.language }}"
  1. Set site language
shell: wp {{ cli_args }} core language activate {{ wordpress.site.locale }}
Edited by Rebar