Use autonyms for displaying search results

And use English names in tooltip

Change-Id: Ibf8e4035677f3c0467fe5165c680bce15e3b3bb5
This commit is contained in:
Santhosh Thottingal
2012-07-26 18:28:27 +05:30
parent e728a690a3
commit fb11c720b5

View File

@@ -45,9 +45,11 @@
*/
addToRegion: function( langCode, region ) {
var that = this,
language = $.uls.data.languages[langCode];
language = that.options.languages[langCode];
var langName = that.options.languages[langCode] || langCode;
var langName = $.uls.data.autonym( langCode )
|| that.options.languages[langCode]
|| langCode;
var regions = [];
if ( region ) {
@@ -62,7 +64,7 @@
var $li = $( '<li>' )
.data( 'code', langCode )
.append(
$( '<a>' ).prop( 'href', '#' ).html( langName )
$( '<a>' ).prop( 'href', '#' ).prop( 'title', language ).html( langName )
);
// Append the element to the column in the list