Bug 1390822 - Flush StringBundles in Fennec browser.js when ui locale changes. r?rnewman
MozReview-Commit-ID: 5J1nNDT2VAb
--- a/mobile/android/chrome/content/browser.js
+++ b/mobile/android/chrome/content/browser.js
@@ -1743,16 +1743,20 @@ var BrowserApp = {
case "Locale:Changed": {
if (data) {
Services.locale.setRequestedLocales([data.languageTag]);
} else {
Services.locale.setRequestedLocales([]);
}
+ // Blow away the string cache so that future lookups get the
+ // correct locale.
+ Strings.flush();
+
// Make sure we use the right Accept-Language header.
let osLocale;
try {
// This should never not be set at this point, but better safe than sorry.
osLocale = Services.prefs.getCharPref("intl.locale.os");
} catch (e) {
}