Skip to content

Commit

Permalink
Consider language tags as case insensitive
Browse files Browse the repository at this point in the history
  • Loading branch information
santhoshtr committed Oct 17, 2013
1 parent fbfaaa2 commit 4ac70e0
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/jquery.ime.selector.js
Original file line number Diff line number Diff line change
Expand Up @@ -341,9 +341,14 @@
* @return {string|bool} Selected input method id or false
*/
selectLanguage: function ( languageCode ) {
var ime = this.$element.data( 'ime' ),
imePref = $.ime.preferences.getIM( languageCode ),
language = $.ime.languages[languageCode];
var ime, imePref, language;

// consider language codes case insensitive
languageCode = languageCode && languageCode.toLowerCase();

ime = this.$element.data( 'ime' );
imePref = $.ime.preferences.getIM( languageCode );
language = $.ime.languages[languageCode];

this.setMenuTitle( this.getAutonym( languageCode ) );

Expand Down

0 comments on commit 4ac70e0

Please sign in to comment.