Add basic information and utils for RTL scripts
Change-Id: Ie01b58cd3627e8f0bf726f0bb296bffb25efcbb5
This commit is contained in:
@@ -554,6 +554,9 @@ scriptgroups:
|
|||||||
SignWriting: [Sgnw]
|
SignWriting: [Sgnw]
|
||||||
NativeAmerican: [Cher, Cans]
|
NativeAmerican: [Cher, Cans]
|
||||||
|
|
||||||
|
rtlscripts:
|
||||||
|
[Arab, Hebr, Syrc, Nkoo, Thaa]
|
||||||
|
|
||||||
regiongroups:
|
regiongroups:
|
||||||
# north-america
|
# north-america
|
||||||
NA: 1
|
NA: 1
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@@ -329,4 +329,13 @@
|
|||||||
autonymB = $.uls.data.autonym( b ) || b;
|
autonymB = $.uls.data.autonym( b ) || b;
|
||||||
return ( autonymA.toLowerCase() < autonymB.toLowerCase() ) ? -1 : 1;
|
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 );
|
} )( jQuery );
|
||||||
|
|||||||
Reference in New Issue
Block a user