public function do_($R) { $data = array_merge(LNG::get('common'), LNG::get('error')); $result = "function _t( key ) {\n" . " var JS_T = " . json_encode($data) . ";\n" . " var kword = key.replace(/\\s/g,'_');\n" . " return ( JS_T[kword] == undefined ) ? key : JS_T[kword];\n" . "};\n" . "function _tl( key ) { return _t(key).toLowerCase(); };\n"; $R->reply($result); }
/** * Create a new model instance. * * @param void * @return void */ public function __construct() { if ($this->DATABASE) { $this->_DBLINK = DBM::get($this->DATABASE); } if (is_string($this->VALIDATORS_ERRORS)) { $this->VALIDATORS_ERRORS = LNG::get($this->VALIDATORS_ERRORS); } }