rem: Xinha._lc = function(string, context, replace) { var url,ret; if (typeof context == 'object' && context.url && context.context) { url = context.url + _editor_lang + ".js"; context = context.context; }  var m = null; if (typeof string == 'string') m = string.match(/\$(.*?)=(.*?)\$/g); if (m) { if (!replace) replace = {}; for (var i = 0;i<m.length;i++) { var n = m[i].match(/\$(.*?)=(.*?)\$/); replace[n[1]] = n[2]; string = string.replace(n[0],'$'+n[1]); } } if ( _editor_lang == "en" ) { if ( typeof string == 'object' && string.string ) { ret = string.string; } else { ret = string; } } else { if ( typeof Xinha._lc_catalog == 'undefined' ) { Xinha._lc_catalog = [ ]; }  if ( typeof context == 'undefined' ) { context = 'Xinha'; }  if ( typeof Xinha._lc_catalog[context] == 'undefined' ) { Xinha._lc_catalog[context] = Xinha._loadlang(context,url); }  var key; if ( typeof string == 'object' && string.key ) { key = string.key; } else if ( typeof string == 'object' && string.string ) { key = string.string; } else { key = string; }  if ( typeof Xinha._lc_catalog[context][key] == 'undefined' ) { if ( context=='Xinha' ) {  if ( typeof string == 'object' && string.string ) { ret = string.string; } else { ret = string; } } else {  return Xinha._lc(string, 'Xinha', replace); } } else { ret = Xinha._lc_catalog[context][key]; } }  if ( typeof string == 'object' && string.replace ) { replace = string.replace; } if ( typeof replace != "undefined" ) { for ( var i in replace ) { ret = ret.replace('$'+i, replace[i]); } }  return ret; 
add: Xinha._lc=function(_21d,_21e,_21f){ var url,ret; if(typeof _21e=="object"&&_21e.url&&_21e.context){ url=_21e.url+_editor_lang+".js"; _21e=_21e.context; } var m=null; if(typeof _21d=="string"){ m=_21d.match(/\$(.*?)=(.*?)\$/g); } if(m){ if(!_21f){ _21f={}; } for(var i=0;i<m.length;i++){ var n=m[i].match(/\$(.*?)=(.*?)\$/); _21f[n[1]]=n[2]; _21d=_21d.replace(n[0],"$"+n[1]); } } if(_editor_lang=="en"){ if(typeof _21d=="object"&&_21d.string){ ret=_21d.string; }else{ ret=_21d; } }else{ if(typeof Xinha._lc_catalog=="undefined"){ Xinha._lc_catalog=[]; } if(typeof _21e=="undefined"){ _21e="Xinha"; } if(typeof Xinha._lc_catalog[_21e]=="undefined"){ Xinha._lc_catalog[_21e]=Xinha._loadlang(_21e,url); } var key; if(typeof _21d=="object"&&_21d.key){ key=_21d.key; }else{ if(typeof _21d=="object"&&_21d.string){ key=_21d.string; }else{ key=_21d; } } if(typeof Xinha._lc_catalog[_21e][key]=="undefined"){ if(_21e=="Xinha"){ if(typeof _21d=="object"&&_21d.string){ ret=_21d.string; }else{ ret=_21d; } }else{ return Xinha._lc(_21d,"Xinha",_21f); } }else{ ret=Xinha._lc_catalog[_21e][key]; } } if(typeof _21d=="object"&&_21d.replace){ _21f=_21d.replace; } if(typeof _21f!="undefined"){ for(var i in _21f){ ret=ret.replace("$"+i,_21f[i]); } } return ret; 
context: Xinha._lc = function(string, context, replace){  var url,ret;  if (typeof context == 'object' && context.url && context.context)  {    url = context.url + _editor_lang + ".js";    context = context.context;  }  var m = null;  if (typeof string == 'string') m = string.match(/\$(.*?)=(.*?)\$/g);  if (m)   {    if (!replace) replace = {};    for (var i = 0;i<m.length;i++)    {      var n = m[i].match(/\$(.*?)=(.*?)\$/);      replace[n[1]] = n[2];      string = string.replace(n[0],'$'+n[1]);    }  }  if ( _editor_lang == "en" )  {    if ( typeof string == 'object' && string.string )    {      ret = string.string;    }    else    {      ret = string;    }  }  else  {    if ( typeof Xinha._lc_catalog == 'undefined' )    {      Xinha._lc_catalog = [ ];    }    if ( typeof context == 'undefined' )    {      context = 'Xinha';    }    if ( typeof Xinha._lc_catalog[context] == 'undefined' )    {      Xinha._lc_catalog[context] = Xinha._loadlang(context,url);    }    var key;    if ( typeof string == 'object' && string.key )    {      key = string.key;    }    else if ( typeof string == 'object' && string.string )    {      key = string.string;    }    else    {      key = string;    }    if ( typeof Xinha._lc_catalog[context][key] == 'undefined' )    {      if ( context=='Xinha' )      {        // Indicate it's untranslated        if ( typeof string == 'object' && string.string )        {          ret = string.string;        }        else        {          ret = string;        }      }      else      {        //if string is not found and context is not Xinha try if it is in Xinha        return Xinha._lc(string, 'Xinha', replace);      }    }    else    {      ret = Xinha._lc_catalog[context][key];    }  }  if ( typeof string == 'object' && string.replace )  {    replace = string.replace;  }  if ( typeof replace != "undefined" )  {    for ( var i in replace )    {      ret = ret.replace('$'+i, replace[i]);    }  }  return ret;};
meta: 6015	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/6015/d8776708e0e10dfa0ab6ee1d0fa9e512d8d16348/XinhaCore.js/clean/packages/acs-templating/www/resources/xinha-nightly/XinhaCore.js