language handling for js

This commit is contained in:
Jana Deutschländer 2017-01-04 18:09:30 +01:00
commit 4fca1d16bb
5 changed files with 104 additions and 18 deletions

View file

@ -77,3 +77,9 @@ if (typeof console === "undefined" || typeof console.log === "undefined") {
console.log = function() {};
}
}
var wikiLang = "de";
/**
* anonymous func: get page language
*/
(function($){ $("html").attr("lang"); if(typeof(l)!= 'undefined' && l.length>=2) wikiLang=l.substr(0,2).toLowerCase(); if(wikiLang!='de'&& wikiLang!='en') wikiLang='de'; })(jQuery);