public static function getDefaultLang() { if (Language::count('is_default = 1') != 1) { exit('默认语言必须唯一, 请确认后再继续'); } $langInfo = Language::findFirst('is_default = 1'); return $lang; }
public function readLang($module, $msg) { $lang = $this->cookies->get('lang'); $translate = Language::findFirst("lang = '{$lang}' AND module = '{$module}' AND word = '{$msg}'"); }