function I18N(){var self=this; var language=navigator.languages?navigator.languages[0]:navigator.language||navigator.browserLanguage; self._loadI18n(language); }I18N.prototype._loadI18n=function(language){var self=this; var urlI18N; if(window.location.pathname.includes(configuration.getRootPath())){urlI18N="js/i18n/"+language.toLowerCase()+".js"; }else{urlI18N=configuration.getRootPath()+"/js/i18n/"+language.toLowerCase()+".js"; }$.ajax({async:false,type:"GET",url:urlI18N,data:null,success:function(data){},dataType:"script",cache:true,error:function(xhr,textStatus,errorThrown){var lang=language.split("-"); if(lang.length>1){self._loadI18n(lang[0]); }}}); }; I18N.prototype.msg=function(message){if(typeof(i18n_string)!="undefined"&&(i18n_string[message]||""==i18n_string[message])){return i18n_string[message]; }else{if(typeof(parent.i18n_string)!="undefined"&&(parent.i18n_string[message]||""==parent.i18n_string[message])){return parent.i18n_string[message]; }}return message; }; I18N.prototype.write=function(message){if(typeof(i18n_string)!="undefined"&&(i18n_string[message]||""==i18n_string[message])){message=i18n_string[message]; }else{if(typeof(parent.i18n_string)!="undefined"&&(parent.i18n_string[message]||""==parent.i18n_string[message])){message=parent.i18n_string[message]; }}document.write(message); }; var i18n=new I18N();