Fix WordPress support for Get UF Locale
Overview
Following on from the WIP PR on GitHub opened by @mattwire, I have been looking in depth at CiviCRM's relationship with the locale reported by WordPress and/or the Polylang and WPML multilingual plugins.
Current behaviour
As far as I can tell, when "Inherit language" is selected, CiviCRM only displays in the default CiviCRM language, whether on the front-end or in WordPress admin.
Proposed behaviour
When "Inherit language" is selected, the logic that CiviCRM should follow is that:
- CiviCRM's admin screens ought to be displayed in the language that the WordPress User has chosen on their Profile screen, since this is what the rest of the WordPress admin displays to them.
- CiviCRM's front-end forms ought to default to the language that WordPress is set to.
- CiviCRM's front-end forms ought to respect to the language that multilingual plugins report.
Comments
PR to follow.