function locale_translate_delete_form_submit

7.x locale.admin.inc locale_translate_delete_form_submit($form, &$form_state)
6.x locale.inc locale_translate_delete_form_submit($form, &$form_state)

Process string deletion submissions.

Related topics

File

drupal-6.x/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';
}