|
|
@ -94,20 +94,15 @@ |
|
|
|
// get a localized string
|
|
|
|
// get a localized string
|
|
|
|
get: translateString, |
|
|
|
get: translateString, |
|
|
|
|
|
|
|
|
|
|
|
// get|set the document language and direction
|
|
|
|
// get the document language
|
|
|
|
get language() { |
|
|
|
getLanguage: function() { return gLanguage; }, |
|
|
|
return { |
|
|
|
|
|
|
|
// get|set the document language (ISO-639-1)
|
|
|
|
// get the direction (ltr|rtl) of the current language
|
|
|
|
get code() { return gLanguage; }, |
|
|
|
getDirection: function() { |
|
|
|
|
|
|
|
// http://www.w3.org/International/questions/qa-scripts
|
|
|
|
// get the direction (ltr|rtl) of the current language
|
|
|
|
// Arabic, Hebrew, Farsi, Pashto, Urdu
|
|
|
|
get direction() { |
|
|
|
var rtlList = ['ar', 'he', 'fa', 'ps', 'ur']; |
|
|
|
// http://www.w3.org/International/questions/qa-scripts
|
|
|
|
return (rtlList.indexOf(gLanguage) >= 0) ? 'rtl' : 'ltr'; |
|
|
|
// Arabic, Hebrew, Farsi, Pashto, Urdu
|
|
|
|
|
|
|
|
var rtlList = ['ar', 'he', 'fa', 'ps', 'ur']; |
|
|
|
|
|
|
|
return (rtlList.indexOf(gLanguage) >= 0) ? 'rtl' : 'ltr'; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
}; |
|
|
|
}; |
|
|
|
})(this); |
|
|
|
})(this); |
|
|
|