function locale_translate_delete_translation_files
Same name and namespace in other branches
- 10 core/modules/locale/locale.bulk.inc \locale_translate_delete_translation_files()
- 11.x core/modules/locale/locale.bulk.inc \locale_translate_delete_translation_files()
- 9 core/modules/locale/locale.bulk.inc \locale_translate_delete_translation_files()
- 8.9.x core/modules/locale/locale.bulk.inc \locale_translate_delete_translation_files()
Deletes interface translation files and translation history records.
Parameters
array $projects: (optional) Project names from which to delete the translation files and history. Defaults to all projects.
array $langcodes: (optional) Language codes from which to delete the translation files and history. Defaults to all languages.
Return value
bool TRUE if files are removed successfully. FALSE if one or more files could not be deleted.
Deprecated
in drupal:11.4.0 and is removed from drupal:13.0.0. Use \Drupal::service(LocaleFileManager::class) ->deleteTranslationFiles($projects, $langcodes) instead.
See also
https://www.drupal.org/node/3577675
File
-
core/
modules/ locale/ locale.bulk.inc, line 439
Code
function locale_translate_delete_translation_files(array $projects = [], array $langcodes = []) {
@trigger_error(__FUNCTION__ . '() is deprecated in drupal:11.4.0 and is removed from drupal:13.0.0. Use \\Drupal::service(LocaleFileManager::class)->deleteTranslationFiles($projects, $langcodes) instead. See https://www.drupal.org/node/3577675', E_USER_DEPRECATED);
return !\Drupal::service(LocaleFileManager::class)->deleteTranslationFiles($projects, $langcodes);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.