1function IwI18n(locale) { 2 this.locale=locale; 3 this.obj=new Array(); 4} 5IwI18n.prototype.put = function(key,value) { 6 this.obj[key]=value; 7} 8IwI18n.prototype.get = function(key,params) { 9 var value=this.obj[key]; 10 if (value==null) { 11 value=key; 12 this.obj[key]=key; 13 var numParams=params==null?0:params.length; 14 if (numParams!=0) { 15 value+="("; 16 for (var i=0;i<numParams;i++) { 17 value+="{"+i+"}"; 18 if (i<numParams-1) { 19 value+=","; 20 } 21 } 22 value+=")"; 23 } 24 var ajax=new IwAjax(); 25 ajax.loadXmlDoc('/iwetc/utils/i18n/newObject.jsp?dirty=true&key='+escape(key)+'&numParams='+numParams); 26 } 27 if (params!=null) { 28 value=this.applyParams(value,params); 29 } 30 return value; 31} 32IwI18n.prototype.alert = function(value,params) { 33 alert(this.get(value,params)); 34} 35IwI18n.prototype.confirm = function(value,params) { 36 return confirm(this.get(value,params)); 37} 38IwI18n.prototype.applyParams = function(value,params) { 39 for (var i=0;i<params.length;i++) { 40 value=value.replace('{'+i+'}',''+params[i]); 41 } 42 return value; 43}
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.