You are here

function locale_languages_predefined_form in Drupal 7

Same name and namespace in other branches
  1. 6 includes/locale.inc \locale_languages_predefined_form()

Predefined language setup form.

Related topics

1 string reference to 'locale_languages_predefined_form'
locale_languages_add_screen in modules/locale/locale.admin.inc
User interface for the language addition screen.

File

modules/locale/locale.admin.inc, line 190
Administration functions for locale.module.

Code

function locale_languages_predefined_form($form) {
  $predefined = _locale_prepare_predefined_list();
  $form['language list'] = array(
    '#type' => 'fieldset',
    '#title' => t('Predefined language'),
    '#collapsible' => TRUE,
  );
  $form['language list']['langcode'] = array(
    '#type' => 'select',
    '#title' => t('Language name'),
    '#default_value' => key($predefined),
    '#options' => $predefined,
    '#description' => t('Use the <em>Custom language</em> section below if your desired language does not appear in this list.'),
  );
  $form['language list']['actions'] = array(
    '#type' => 'actions',
  );
  $form['language list']['actions']['submit'] = array(
    '#type' => 'submit',
    '#value' => t('Add language'),
  );
  return $form;
}