You are here

function locale_add_language_form_submit in Drupal 5

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

Process the language addition form submission.

File

includes/locale.inc, line 218
Admin-related functions for locale.module.

Code

function locale_add_language_form_submit($form_id, $form_values) {
  if (isset($form_values['langname'])) {

    // Custom language form.
    _locale_add_language($form_values['langcode'], $form_values['langname']);
  }
  else {
    $isocodes = _locale_get_iso639_list();
    _locale_add_language($form_values['langcode'], $isocodes[$form_values['langcode']][0]);
  }
  return 'admin/settings/locale';
}