select(); $select->from(Qs_Db::getTableName(Qs_Db_Language::$_tableAlias)); $select->where('`enabled` = "y"'); $select->order(['def', 'sorter']); $list = $db->fetchAll($select); Qs_Db_Language::$_list = []; foreach ($list as $language) { Qs_Db_Language::$_list[$language['name']] = $language; } } return Qs_Db_Language::$_list; } public static function getDefault() { if (null === Qs_Db_Language::$_default) { $list = Qs_Db_Language::getList(); foreach ($list as $language) { if ($language['def'] == 'y') { Qs_Db_Language::$_default = $language['name']; break; } } } return Qs_Db_Language::$_default; } public static function exists($language) { $list = Qs_Db_Language::getList(); return isset($list[$language]); } }