Add basic information and utils for RTL scripts

Change-Id: Ie01b58cd3627e8f0bf726f0bb296bffb25efcbb5
This commit is contained in:
Amir E. Aharoni
2012-08-22 18:16:01 +03:00
parent 567cb54a9a
commit 67dd765e13
4 changed files with 17 additions and 2 deletions

View File

@@ -554,6 +554,9 @@ scriptgroups:
SignWriting: [Sgnw]
NativeAmerican: [Cher, Cans]
rtlscripts:
[Arab, Hebr, Syrc, Nkoo, Thaa]
regiongroups:
# north-america
NA: 1

File diff suppressed because one or more lines are too long

View File

@@ -329,4 +329,13 @@
autonymB = $.uls.data.autonym( b ) || b;
return ( autonymA.toLowerCase() < autonymB.toLowerCase() ) ? -1 : 1;
};
/**
* Check if a language is right-to-left.
* @param string language code
* @return boolean
*/
$.uls.data.isRtl = function( language ) {
return $.inArray( $.uls.data.script( language ), $.uls.data.rtlscripts ) !== -1;
};
} )( jQuery );