W3cubDocs

/Drupal 8

function locale_translation_file_history_delete

locale_translation_file_history_delete($projects = array(), $langcodes = array())

Deletes the history of downloaded translations.

Parameters

array $projects: Project name(s) to be deleted from the file history. If both project(s) and language code(s) are specified the conditions will be ANDed.

array $langcodes: Language code(s) to be deleted from the file history.

File

core/modules/locale/locale.module, line 866
Enables the translation of the user interface to languages other than English.

Code

function locale_translation_file_history_delete($projects = array(), $langcodes = array()) {
  $query = db_delete('locale_file');
  if (!empty($projects)) {
    $query->condition('project', $projects, 'IN');
  }
  if (!empty($langcodes)) {
    $query->condition('langcode', $langcodes, 'IN');
  }
  $query->execute();
}

© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!modules!locale!locale.module/function/locale_translation_file_history_delete/8.1.x