$(document).ready( function() { var storedLang; var storedAccess; var availLang = ['en','de']; var availAccess = ['default','expert'] //$.i18n.debug = true; function storageComp(){ if (typeof(Storage) !== "undefined") return true; return false; } function initTrans(lc){ if (lc == 'auto') { $.i18n().load().done( function() { performTranslation(); }); } else { $.i18n().locale = lc; $.i18n().load( "i18n", lc ).done( function() { performTranslation(); }); } } //i18n if (storageComp()) { storedLang = localStorage.getItem("langcode"); if (storedLang == null) { localStorage.langcode = "auto"; storedLang = 'auto'; initTrans('auto'); } else { initTrans(storedLang); } } else { showInfoDialog('warning', "Can't store settings", "Your browser doesn't support localStorage. You can't save a specific language setting (fallback to 'auto detection') and access level (fallback to 'default'). You could still use the webinterface without further issues"); initTrans('auto'); $('#btn_setlang').toggle(); $('#btn_setaccess').toggle(); } $('#btn_setlang').off().on('click',function() { $('#modal_select').html(''); for (var lcx = 0; lcx