function locale_translate_get_interface_translation_files
Same name and namespace in other branches
- 10 core/modules/locale/locale.bulk.inc \locale_translate_get_interface_translation_files()
- 11.x core/modules/locale/locale.bulk.inc \locale_translate_get_interface_translation_files()
- 9 core/modules/locale/locale.bulk.inc \locale_translate_get_interface_translation_files()
- 8.9.x core/modules/locale/locale.bulk.inc \locale_translate_get_interface_translation_files()
Get interface translation files present in the translations directory.
Parameters
array $projects: (optional) Project names from which to get the translation files and history. Defaults to all projects.
array $langcodes: (optional) Language codes from which to get the translation files and history. Defaults to all languages.
Return value
array An array of interface translation files keyed by their URI.
Deprecated
in drupal:11.4.0 and is removed from drupal:13.0.0. Use \Drupal::service(LocaleFileManager::class) ->getInterfaceTranslationFiles($projects, $langcodes) instead.
See also
https://www.drupal.org/node/3577675
File
-
core/
modules/ locale/ locale.bulk.inc, line 35
Code
function locale_translate_get_interface_translation_files(array $projects = [], array $langcodes = []) : array {
\Drupal::moduleHandler()->loadInclude('locale', 'inc', 'locale.compare');
@trigger_error(__FUNCTION__ . '() is deprecated in drupal:11.4.0 and is removed from drupal:13.0.0. Use \\Drupal::service(LocaleFileManager::class)->getInterfaceTranslationFiles($projects, $langcodes) instead. See https://www.drupal.org/node/3577675', E_USER_DEPRECATED);
return \Drupal::service(LocaleFileManager::class)->getInterfaceTranslationFiles($projects, $langcodes);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.