You are here

function _i18n_language_select in Internationalization 5.3

Same name and namespace in other branches
  1. 5 i18n.module \_i18n_language_select()
  2. 5.2 i18n.module \_i18n_language_select()
  3. 6 i18n.module \_i18n_language_select()

Helper function to create language selector

1 call to _i18n_language_select()
i18n_form_alter in ./i18n.module
Implementation of hook_form_alter

File

./i18n.module, line 1158
Internationalization (i18n) module

Code

function _i18n_language_select($value = '', $description = '', $weight = -20, $languages = NULL) {
  $languages = $languages ? $languages : i18n_language_list();
  return array(
    '#type' => 'select',
    '#title' => t('Language'),
    '#default_value' => $value,
    '#options' => array_merge(array(
      '' => '',
    ), $languages),
    '#description' => $description,
    '#weight' => $weight,
  );
}