diff --git a/chrome/content/zotero/preferences/preferences_advanced.js b/chrome/content/zotero/preferences/preferences_advanced.js index 3566dd677f..705322c4bf 100644 --- a/chrome/content/zotero/preferences/preferences_advanced.js +++ b/chrome/content/zotero/preferences/preferences_advanced.js @@ -470,7 +470,6 @@ Zotero_Preferences.Advanced = { refreshLocale: function () { - var requestedLocale = Services.locale.getRequestedLocale(); var autoLocaleName, currentValue; // If matching OS, get the name of the current locale @@ -481,7 +480,7 @@ Zotero_Preferences.Advanced = { // Otherwise get the name of the locale specified in the pref else { autoLocaleName = Zotero.getString('zotero.preferences.locale.automatic'); - currentValue = requestedLocale; + currentValue = Zotero.locale; } // Populate menu diff --git a/chrome/content/zotero/xpcom/intl.js b/chrome/content/zotero/xpcom/intl.js index 13b40ded22..abf4596763 100644 --- a/chrome/content/zotero/xpcom/intl.js +++ b/chrome/content/zotero/xpcom/intl.js @@ -41,6 +41,7 @@ Zotero.Intl = new function () { else if (prevLocale) { try { Services.locale.setRequestedLocales([prevLocale]); + Zotero.Prefs.set('intl.regional_prefs.use_os_locales', false, true); } catch (e) { // Don't panic if the value is not a valid locale code @@ -58,7 +59,10 @@ Zotero.Intl = new function () { [pluralFormGet, pluralFormNumForms] = PluralForm.makeGetter(parseInt(getIntlProp('pluralRule', 1))); setOrClearIntlPref('intl.accept_languages', 'string'); - Zotero.locale = Services.locale.getRequestedLocale(); + Zotero.locale = Zotero.Utilities.Internal.resolveLocale( + Services.locale.getRequestedLocale(), + Services.locale.getAvailableLocales() + ); // Also load the brand as appName Zotero.appName = Services.strings diff --git a/chrome/content/zotero/xpcom/locale.js b/chrome/content/zotero/xpcom/locale.js index aafe9faaf2..3670f0c4bb 100644 --- a/chrome/content/zotero/xpcom/locale.js +++ b/chrome/content/zotero/xpcom/locale.js @@ -15,8 +15,8 @@ Zotero.Locale = { 'es-ES': 'Español', 'et-EE': 'Eesti keel', 'fa': 'فارسی', - 'fi': 'suomi', - 'fr': 'Français', + 'fi-FI': 'suomi', + 'fr-FR': 'Français', 'gl-ES': 'Galego', 'hu-HU': 'magyar', 'id-ID': 'Bahasa Indonesia',