Details
-
Type: Bug
-
Status: Done/Fixed
-
Priority: Minor
-
Resolution: Won't Fix
-
Affects Version/s: 3.2
-
Fix Version/s: None
-
Component/s: Core CiviCRM
-
Labels:None
Description
Using CiviCRM 3.2 svn trunk, if I activate "inherit CMS language" in Admin/Settings/Localization, the CiviCRM interface will always use fr_FR, and not fr_CA.
This has to do with how CRM/Utils/System/Drupal/getUFLocale() uses CRM_Core_I18n_PseudoConstant::languages() to get available languages, then uses whatever regional language is last alphabetically for a given language. So fr_FR is alphabetically after fr_CA, and therefore "wins".
My first thought was to delete i10n/fr_FR translation files, but then CiviCRM fallsback to English, since it really only looks for fr_FR.
I experimented with CRM_Core_I18n::languages(), which checks if the language files really exist, which would at least allow users to easily disable fr_FR from their installations, but getUFLocale() is called too early in the process and $config is not yet fully populated, so itt does not find the location of the l10n directory.
I ended up copying fr_CA over fr_FR files to make it work.
Since the translation system may change in the short term, and given that few people use fr_CA, I recommend just closing the issue for now.
Note that this also affects pt_BR.
mathieu / bgm