select(); $select->from(Qs_Db::getTableName(Qs_Db_Language::$_tableAlias, Qs_Db_Language::$_isService)); $select->where('enabled = ?', 'y'); $select->order(array('def', 'sorter')); $list = $db->fetchAll($select); Qs_Db_Language::$_list = array(); 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]); } }