public function loadlangAction($pass = '') { Core\Langger::resetLang(); $lang_file = Yaf_Registry::get('config')->get('application.lang'); $configM = Yaf_Registry::get('config')->get('application.configM'); if ($configM == 'Memcache' || $configM == 'Redis') { $mHost = Yaf_Registry::get('config')->get('application.mhost'); $mPort = Yaf_Registry::get('config')->get('application.mport'); } else { $mHost = NULL; $mPort = NULL; $configM = 'Yac'; } $re = FastFramework_L::initLang($lang_file, $configM, $mHost, $mPort); var_dump($re); return FALSE; }
/** * 获取错误信息配置代码 * @param string $code * @return string */ function La($code) { return Core\Langger::get('lang_' . $code, FALSE); }
public static function initLang($langFile, $configerM = 'Yac', $mHost = '127.0.0.1', $mPort = 11211) { Core\Langger::init($configerM, $mHost, $mPort); return Core\Langger::parserLang($langFile); }