function i18n_element_language_select in Internationalization 7
Get language selector form element
3 calls to i18n_element_language_select()
- i18n_menu_form_menu_edit_item_alter in i18n_menu/
i18n_menu.module - Implements hook_form_FORM_ID_alter().
- i18n_taxonomy_form_taxonomy_form_term_alter in i18n_taxonomy/
i18n_taxonomy.module - Implements hook_form_FORM_ID_alter()
- i18n_translation_mode_element in i18n_translation/
i18n_translation.module - Get form element for translation mode and language
File
- ./
i18n.module, line 160 - Internationalization (i18n) module.
Code
function i18n_element_language_select($default = LANGUAGE_NONE) {
if (is_object($default) || is_array($default)) {
$default = i18n_object_langcode($default, LANGUAGE_NONE);
}
return array(
'#type' => 'select',
'#title' => t('Language'),
'#default_value' => $default,
'#options' => array(
LANGUAGE_NONE => t('Language neutral'),
) + i18n_language_list(),
);
}