var tmp=function(){var c,a;a=function(m){try{var k,f,d,j,q,h,r,o,g,p;d=kbook.model.language;j=kbook.root.nodes[6];h=["en","es","de","fr","ka","it","nl","ru","ua"];r={en:"English",de:"Deutsch",es:"Español",fr:"Français",it:"Italiano",ka:"ქართული",nl:"Nederlands",ru:"Русский",ua:"Українська"};if(d===undefined){d="en";}PARAMS.loadCore();p=m.config.corePath+"lang/"+d+".js";m.lang.init(p);for(k=0,f=h.length;k<f;k++){if(!Date.prototype.strings[h[k]]){Date.prototype.strings[h[k]]=xs.newInstanceOf(Date.prototype.strings.en);Number.prototype.strings[h[k]]=xs.newInstanceOf(Number.prototype.strings.en);}}q=m.ui.createContainerNode({title:"fskin:/l/strings/STR_NODE_TITLE_LANG_SETTINGS".idToString(),icon:"LANGUAGE",comment:function(){return r[kbook.model.language];},parent:j});o=function(){try{Fskin.localize.setLocale({language:this.tag,region:"XX"});kbook.model.language=this.tag;kbook.model.clearTitleSorters();kbook.root.update(kbook.model);kbook.model.writeFilePreference();this.parent.gotoParent(kbook.model);m.ui.showMsg(m.lang.L("MSG_RESTART"));}catch(i){PARAMS.bootLog("changing language",i);}};for(k=0,f=h.length;k<f;k++){g=m.ui.createContainerNode({title:r[h[k]],icon:"CROSSED_BOX",parent:q});g.tag=h[k];g.enter=o;if(d===h[k]){g.selected=true;}q.nodes.push(g);}j.nodes[4]=q;delete this.localize;PARAMS.loadAddons();m.init();}catch(l){PARAMS.bootLog("localize",l);}};c=Fskin.localize.setLocale;Fskin.localize.setLocale=function(){try{c.apply(this,arguments);a(PARAMS.Core);Fskin.localize.setLocale=c;}catch(d){PARAMS.bootLog("in overriden setLocale",d);}};kbook.model.container.sandbox.PAGE_GROUP.sandbox.doDigit=function(e){try{var k,h,g,d,f;PARAMS.bootLog("sandbox.PAGE is "+this.sandbox.PAGE);k=this.sandbox.PAGE.countPages().toString().length-1;h="";for(g=0;g<k;g++){h+="_";}f=e.key.charAt(0);if(f!=="0"){h+=f;}else{h+="_";}this.setVariable("GOTO_VARIABLE",h);d=kbook.model.container;d.sandbox.beforeModal.call(d,d.sandbox.GOTO_GROUP);}catch(j){PARAMS.bootLog("error in doDigit: "+j);}};var b=PARAMS.Core.config.compat.compareStrings;String.prototype.localeCompare=function(d){return b(this.valueOf(),d);};};try{tmp();}catch(ignore){}