function install_select_locale_form
install_select_locale_form($form, &$form_state, $locales, $profilename)
Form constructor for the language selection form.
Related topics
File
- includes/install.core.inc, line 1322
- API functions for installing Drupal.
Code
function install_select_locale_form($form, &$form_state, $locales, $profilename) { include_once DRUPAL_ROOT . '/includes/iso.inc'; $languages = _locale_get_predefined_list(); foreach ($locales as $locale) { $name = $locale->langcode; if (isset($languages[$name])) { $name = $languages[$name][0] . (isset($languages[$name][1]) ? ' ' . st('(@language)', array('@language' => $languages[$name][1])) : ''); } $form['locale'][$locale->langcode] = array( '#type' => 'radio', '#return_value' => $locale->langcode, '#default_value' => $locale->langcode == 'en' ? 'en' : '', '#title' => $name . ($locale->langcode == 'en' ? ' ' . st('(built-in)') : ''), '#parents' => array('locale') ); } if (count($locales) == 1) { $form['help'] = array( '#markup' => '<p><a href="install.php?profile=' . $profilename . '&localize=true">' . st('Learn how to install Drupal in other languages') . '</a></p>', ); } $form['actions'] = array('#type' => 'actions'); $form['actions']['submit'] = array( '#type' => 'submit', '#value' => st('Save and continue'), ); return $form; }
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/includes!install.core.inc/function/install_select_locale_form/7.x