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();
}
doc_Drupal
2016-10-29 09:24:24
Comments
Leave a Comment

Please login to continue.