function locale_translation_file_history_delete
Same name in other branches
- 9 core/modules/locale/locale.module \locale_translation_file_history_delete()
- 8.9.x core/modules/locale/locale.module \locale_translation_file_history_delete()
- 11.x core/modules/locale/locale.module \locale_translation_file_history_delete()
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.
2 calls to locale_translation_file_history_delete()
- locale_system_remove in core/
modules/ locale/ locale.module - Delete translation history of modules and themes.
- locale_translate_delete_translation_files in core/
modules/ locale/ locale.bulk.inc - Deletes interface translation files and translation history records.
File
-
core/
modules/ locale/ locale.module, line 829
Code
function locale_translation_file_history_delete($projects = [], $langcodes = []) {
$query = \Drupal::database()->delete('locale_file');
if (!empty($projects)) {
$query->condition('project', $projects, 'IN');
}
if (!empty($langcodes)) {
$query->condition('langcode', $langcodes, 'IN');
}
$query->execute();
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.