You are here

function locale_add_language_form_submit in Drupal 4

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

Process the language addition form submission.

File

includes/locale.inc, line 191
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/locale';
}