1 locale.pages.inc locale_translate_delete_form_submit($form, &$form_state)

Process string deletion submissions.

File

core/modules/locale/locale.pages.inc, line 445
Interface translation summary, editing and deletion user interfaces.

Code

function locale_translate_delete_form_submit($form, &$form_state) {
  require_once BACKDROP_ROOT . '/core/includes/locale.inc';

  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()->deletePrefix('locale:');
  backdrop_set_message(t('The string has been removed.'));
  $form_state['redirect'] = 'admin/config/regional/translate/translate';
}