(function($){$.i18n={setDictionary:function(i18n_dict){this.i18n_dict=i18n_dict;},_:function(str,params){var transl=str;if(this.i18n_dict&&this.i18n_dict[str]){transl=this.i18n_dict[str];}else{transl="???"+transl+"???";}
return this.printf(transl,params);},toEntity:function(str){var result='';for(var i=0;i<str.length;i++){if(str.charCodeAt(i)>128)
result+="&#"+str.charCodeAt(i)+";";else
result+=str.charAt(i);}
return result;},stripStr:function(str){return str.replace(/^\s*/,"").replace(/\s*$/,"");},stripStrML:function(str){var parts=str.split('\n');for(var i=0;i<parts.length;i++)
parts[i]=stripStr(parts[i]);return stripStr(parts.join(" "));},printf:function(S,L){if(!L)return S;var nS="";var tS=S.split("%s");for(var i=0;i<L.length;i++){if(tS[i].lastIndexOf('%')==tS[i].length-1&&i!=L.length-1)
tS[i]+="s"+tS.splice(i+1,1)[0];nS+=tS[i]+L[i];}
return nS+tS[tS.length-1];}};})(jQuery);