function i18n_language_name in Internationalization 7
Get language name for any defined (enabled or not) language
See also
9 calls to i18n_language_name()
- i18nSelectTestCase::assertContent in i18n_select/
i18n_select.test - Check some nodes are displayed, some are not
- i18n_field_page_translate in i18n_field/
i18n_field.pages.inc - Field translation page
- i18n_menu_form_menu_edit_item_alter in i18n_menu/
i18n_menu.module - Implements hook_form_FORM_ID_alter().
- i18n_node_node_view in i18n_node/
i18n_node.module - Implements hook_node_view()
- i18n_string_translate_page_object in i18n_string/
i18n_string.pages.inc - Generate translate page from object.
File
- ./
i18n.module, line 210 - Internationalization (i18n) module.
Code
function i18n_language_name($lang) {
$list =& drupal_static(__FUNCTION__);
if (!isset($list)) {
$list = locale_language_list('name', TRUE);
}
if (!$lang || $lang === LANGUAGE_NONE) {
return t('Undefined');
}
elseif (isset($list[$lang])) {
return check_plain($list[$lang]);
}
else {
return t('Unknown');
}
}