You are here

function locale_translate_delete_form_submit in Drupal 7

Same name and namespace in other branches
  1. 6 includes/locale.inc \locale_translate_delete_form_submit()

Process string deletion submissions.

Related topics

File

modules/locale/locale.admin.inc, line 1259
Administration functions for locale.module.

Code

function locale_translate_delete_form_submit($form, &$form_state) {
  db_delete('locales_source')
    ->condition('lid', $form_state['values']['lid'])
    ->execute();
  db_delete('locales_target')
    ->condition('lid', $form_state['values']['lid'])
    ->execute();

  // 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/config/regional/translate/translate';
}