Same name and namespace in other branches
  1. 7.x modules/locale/locale.admin.inc \locale_translate_delete_form_submit()

Process string deletion submissions.

Related topics

File

includes/locale.inc, line 946
Administration functions for locale.module.

Code

function locale_translate_delete_form_submit($form, &$form_state) {
  db_query('DELETE FROM {locales_source} WHERE lid = %d', $form_state['values']['lid']);
  db_query('DELETE FROM {locales_target} WHERE lid = %d', $form_state['values']['lid']);

  // Force JavaScript translation file recreation for all languages.
  _locale_invalidate_js();
  cache_clear_all('locale:', 'cache', TRUE);
  drupal_set_message(t('The string has been removed.'));
  $form_state['redirect'] = 'admin/build/translate/search';
}