mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-19 22:58:07 +02:00
Merge pull request #2607 from yurydelendik/mozL10n-ext-fix
Fixes dir attribute for the extension
This commit is contained in:
commit
f7a0d6ccc4
1 changed files with 8 additions and 13 deletions
|
@ -94,20 +94,15 @@
|
|||
// get a localized string
|
||||
get: translateString,
|
||||
|
||||
// get|set the document language and direction
|
||||
get language() {
|
||||
return {
|
||||
// get|set the document language (ISO-639-1)
|
||||
get code() { return gLanguage; },
|
||||
// get the document language
|
||||
getLanguage: function() { return gLanguage; },
|
||||
|
||||
// get the direction (ltr|rtl) of the current language
|
||||
get direction() {
|
||||
// http://www.w3.org/International/questions/qa-scripts
|
||||
// Arabic, Hebrew, Farsi, Pashto, Urdu
|
||||
var rtlList = ['ar', 'he', 'fa', 'ps', 'ur'];
|
||||
return (rtlList.indexOf(gLanguage) >= 0) ? 'rtl' : 'ltr';
|
||||
}
|
||||
};
|
||||
// get the direction (ltr|rtl) of the current language
|
||||
getDirection: function() {
|
||||
// http://www.w3.org/International/questions/qa-scripts
|
||||
// Arabic, Hebrew, Farsi, Pashto, Urdu
|
||||
var rtlList = ['ar', 'he', 'fa', 'ps', 'ur'];
|
||||
return (rtlList.indexOf(gLanguage) >= 0) ? 'rtl' : 'ltr';
|
||||
}
|
||||
};
|
||||
})(this);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue