1.20.x language.admin.inc language_admin_delete_form_submit($form, &$form_state)

Process language deletion submissions.

File

modules/language/language.admin.inc, line 366
Admin page callbacks for the Language module.

Code

function language_admin_delete_form_submit($form, &$form_state) {
  $langcode = $form_state['values']['langcode'];
  $languages = language_list();
  $language = $languages[$langcode];

  $success = language_delete($langcode);

  if ($success) {
    $t_args = array('%language' => $language->name, '%langcode' => $language->langcode);
    backdrop_set_message(t('The %language (%langcode) language has been removed.', $t_args));
  }

  $form_state['redirect'] = 'admin/config/regional/language';
}