You are here

function _i18n_language_select in Internationalization 6

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

Helper function to create language selector.

File

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

Code

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