--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mozilla-language.patch Wed Sep 29 14:11:58 2010 +0200
@@ -0,0 +1,55 @@
+# HG changeset patch
+# User Wolfgang Rosenauer <wr@rosenauer.org>
+# Parent 6272ce1da6f587a7f29aa9e1f55d5983af413c0e
+Bug 583793 - Firefox interface language set to LANG, ignores LANGUAGE
+
+diff --git a/intl/locale/src/nsLocaleService.cpp b/intl/locale/src/nsLocaleService.cpp
+--- a/intl/locale/src/nsLocaleService.cpp
++++ b/intl/locale/src/nsLocaleService.cpp
+@@ -192,22 +192,24 @@ nsLocaleService::nsLocaleService(void)
+ return;
+ }
+
+ #ifdef MOZ_ENABLE_MEEGOTOUCH
+ // Create a snapshot of the gconf locale values into the
+ // corresponding environment variables to obey system settings
+ // as accurately as possible.
+ CopyGConfToEnv("/meegotouch/i18n/language", "LANG");
++ CopyGConfToEnv("/meegotouch/i18n/language", "LANGUAGE");
+ CopyGConfToEnv("/meegotouch/i18n/lc_collate", NSILOCALE_COLLATE);
+ CopyGConfToEnv("/meegotouch/i18n/lc_monetary", NSILOCALE_MONETARY);
+ CopyGConfToEnv("/meegotouch/i18n/lc_numeric", NSILOCALE_NUMERIC);
+ CopyGConfToEnv("/meegotouch/i18n/lc_time", NSILOCALE_TIME);
+ #endif
+ // Get system configuration
++ const char* language = getenv("LANGUAGE");
+ const char* lang = getenv("LANG");
+ for( i = 0; i < LocaleListLength; i++ ) {
+ nsresult result;
+ // setlocale( , "") evaluates LC_* and LANG
+ char* lc_temp = setlocale(posix_locale_category[i], "");
+ CopyASCIItoUTF16(LocaleList[i], category);
+ category_platform = category;
+ category_platform.AppendLiteral("##PLATFORM");
+@@ -222,16 +224,21 @@ nsLocaleService::nsLocaleService(void)
+ else {
+ CopyASCIItoUTF16(lang, platformLocale);
+ result = posixConverter->GetXPLocale(lang, xpLocale);
+ }
+ }
+ if (NS_FAILED(result)) {
+ return;
+ }
++ // LANGUAGE is overriding LC_MESSAGES
++ if (i == LC_MESSAGES && language) {
++ CopyASCIItoUTF16(language, platformLocale);
++ result = posixConverter->GetXPLocale(language, xpLocale);
++ }
+ resultLocale->AddCategory(category, xpLocale);
+ resultLocale->AddCategory(category_platform, platformLocale);
+ }
+ mSystemLocale = do_QueryInterface(resultLocale);
+ mApplicationLocale = do_QueryInterface(resultLocale);
+ } // if ( NS_SUCCEEDED )...
+
+ #endif // XP_UNIX || XP_BEOS