function locale_admin_manage_delete_form in Drupal 5
Same name and namespace in other branches
- 4 modules/locale.module \locale_admin_manage_delete_form()
User interface for the language deletion confirmation screen.
1 string reference to 'locale_admin_manage_delete_form'
- locale_menu in modules/
locale/ locale.module - Implementation of hook_menu().
File
- modules/
locale/ locale.module, line 310 - Enables administrators to manage the site interface languages.
Code
function locale_admin_manage_delete_form($langcode) {
include_once './includes/locale.inc';
// Do not allow deletion of English locale.
if ($langcode == 'en') {
drupal_set_message(t('The English locale cannot be deleted.'));
drupal_goto('admin/settings/locale/language/overview');
}
// For other locales, warn user that data loss is ahead.
$languages = locale_supported_languages(FALSE, TRUE);
if (!isset($languages['name'][$langcode])) {
drupal_not_found();
}
else {
$form['langcode'] = array(
'#type' => 'value',
'#value' => $langcode,
);
return confirm_form($form, t('Are you sure you want to delete the language %name?', array(
'%name' => t($languages['name'][$langcode]),
)), 'admin/settings/locale/language/overview', t('Deleting a language will remove all data associated with it. This action cannot be undone.'), t('Delete'), t('Cancel'));
}
}