get locale directly from prefs (necessary due to landing of bug 646428 on mozilla-central)
This commit is contained in:
parent
7da6520292
commit
4d5f50bf74
|
@ -237,14 +237,12 @@ var Zotero = new function(){
|
||||||
this.isLinux = (this.platform.substr(0, 5) == "Linux");
|
this.isLinux = (this.platform.substr(0, 5) == "Linux");
|
||||||
this.oscpu = win.navigator.oscpu;
|
this.oscpu = win.navigator.oscpu;
|
||||||
|
|
||||||
// Locale
|
// Locale
|
||||||
var ph = Components.classes["@mozilla.org/network/protocol;1?name=http"].
|
var prefs = Components.classes["@mozilla.org/preferences-service;1"]
|
||||||
getService(Components.interfaces.nsIHttpProtocolHandler);
|
.getService(Components.interfaces.nsIPrefService);
|
||||||
if (ph.language.length == 2) {
|
this.locale = prefs.getBranch("general.useragent.").getCharPref("locale");
|
||||||
this.locale = ph.language + '-' + ph.language.toUpperCase();
|
if (this.locale.length == 2) {
|
||||||
}
|
this.locale = this.locale + '-' + this.locale.toUpperCase();
|
||||||
else {
|
|
||||||
this.locale = ph.language;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Load in the localization stringbundle for use by getString(name)
|
// Load in the localization stringbundle for use by getString(name)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user