function _i18n_locale_supported_languages in Internationalization 5.2
Same name and namespace in other branches
- 5.3 i18n.module \_i18n_locale_supported_languages()
- 5 i18n.module \_i18n_locale_supported_languages()
Returns list of enabled languages from locale module
Some code borrowed from locale module. And yes, if locale enabled, languages are cached twice. But better twice than never ;-)
File
- ./
i18n.module, line 581 - Internationalization (i18n) module
Code
function _i18n_locale_supported_languages() {
if (function_exists('locale_supported_languages')) {
$languages = locale_supported_languages();
return $languages['name'];
}
else {
$result = db_query('SELECT locale, name FROM {locales_meta} WHERE enabled = 1 ORDER BY isdefault DESC, name ASC');
while ($row = db_fetch_object($result)) {
$enabled[$row->locale] = $row->name;
}
return $enabled;
}
}