I am missing a method which would return current active language code. I know I can retrieve it from a cookie but it would be a nice feature to have this method already integrated in a generated code or is there some special reason why this method was left out. This can come very handy when we need to preset active language in the language menu.
Here is code I have used, it is basically just a copy and paste from your method runUpdate
function getActiveLanguage() { var currentlanguage=0; // firstlanguage if (readCookie('language') != '' && typeof Number(readCookie('language')) == 'number') { currentlanguage=Number(readCookie('language')); } else { jQuery.browserLanguage(function( language , acceptHeader ){ try { createCookie('language', mllanguages[language], 30); currentlanguage=mllanguages[language]; } catch(e) {currentlanguage=0;} }); } if (isNaN(currentlanguage)) { currentlanguage = 0; } return currentlanguage; }