mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-08 04:27:37 +00:00
Bug 958985 - Make isBidiEnabled check the intl.uidirection.<locale> pref; r=smontagu
This commit is contained in:
parent
4dbe302a29
commit
b1d4e4a699
@ -425,8 +425,13 @@ function isBidiEnabled() {
|
||||
if (getBoolPref("bidi.browser.ui", false))
|
||||
return true;
|
||||
|
||||
// if the pref isn't set, check for an RTL locale and force the pref to true
|
||||
// if we find one.
|
||||
// then check intl.uidirection.<locale>
|
||||
var chromeReg = Cc["@mozilla.org/chrome/chrome-registry;1"].
|
||||
getService(Ci.nsIXULChromeRegistry);
|
||||
if (chromeReg.isLocaleRTL("global"))
|
||||
return true;
|
||||
|
||||
// now see if the system locale is an RTL one.
|
||||
var rv = false;
|
||||
|
||||
try {
|
||||
@ -438,6 +443,7 @@ function isBidiEnabled() {
|
||||
case "ar-":
|
||||
case "he-":
|
||||
case "fa-":
|
||||
case "ug-":
|
||||
case "ur-":
|
||||
case "syr":
|
||||
rv = true;
|
||||
|
Loading…
Reference in New Issue
Block a user