function locale_admin_manage_delete_form_submit in Drupal 4
Same name and namespace in other branches
- 5 modules/locale/locale.module \locale_admin_manage_delete_form_submit()
Process language deletion submissions.
File
- modules/
locale.module, line 342 - Enables administrators to manage the site interface languages.
Code
function locale_admin_manage_delete_form_submit($form_id, $form_values) {
$languages = locale_supported_languages(FALSE, TRUE);
if (isset($languages['name'][$form_values['langcode']])) {
db_query("DELETE FROM {locales_meta} WHERE locale = '%s'", $form_values['langcode']);
db_query("DELETE FROM {locales_target} WHERE locale = '%s'", $form_values['langcode']);
$message = t('The language %locale has been removed.', array(
'%locale' => theme('placeholder', t($languages['name'][$form_values['langcode']])),
));
drupal_set_message($message);
watchdog('locale', $message);
}
// Changing the locale settings impacts the interface:
cache_clear_all();
return 'admin/locale/language/overview';
}