Add basic support for dir and lang attributes for autonyms
Added a util function for getting the language's direction. Added lang and dir attributes for every language item in the list.
This commit is contained in:
@@ -339,6 +339,15 @@
|
||||
return $.inArray( $.uls.data.script( language ), $.uls.data.rtlscripts ) !== -1;
|
||||
};
|
||||
|
||||
/**
|
||||
* Return the direction of the language
|
||||
* @param string language code
|
||||
* @return string
|
||||
*/
|
||||
$.uls.data.getDir = function( language ) {
|
||||
return $.uls.data.isRtl( language ) ? 'rtl' : 'ltr';
|
||||
};
|
||||
|
||||
/**
|
||||
* Returns the languages spoken in a territory.
|
||||
* @param string Territory code
|
||||
|
||||
Reference in New Issue
Block a user