function locale_translation_check_projects

Same name and namespace in other branches
  1. 10 core/modules/locale/locale.compare.inc \locale_translation_check_projects()
  2. 11.x core/modules/locale/locale.compare.inc \locale_translation_check_projects()
  3. 9 core/modules/locale/locale.compare.inc \locale_translation_check_projects()
  4. 8.9.x core/modules/locale/locale.compare.inc \locale_translation_check_projects()

Check for the latest release of project translations.

Parameters

array $projects: Array of project names to check. Defaults to all translatable projects.

array $langcodes: Array of language codes. Defaults to all translatable languages.

Deprecated

in drupal:11.4.0 and is removed from drupal:13.0.0. Use \Drupal::service(LocaleProjectChecker::class)->checkProjects() instead.

See also

https://www.drupal.org/node/3037033

File

core/modules/locale/locale.compare.inc, line 172

Code

function locale_translation_check_projects($projects = [], $langcodes = []) : void {
  @trigger_error(__FUNCTION__ . '() is deprecated in drupal:11.4.0 and is removed from drupal:13.0.0. Use \\Drupal::service(LocaleProjectChecker::class)->checkProjects() instead. See https://www.drupal.org/node/3037033', E_USER_DEPRECATED);
  if (empty($projects)) {
    $projects = array_keys(\Drupal::service(LocaleProjectRepository::class)->getAll());
  }
  \Drupal::service(LocaleProjectChecker::class)->checkProjects($projects, $langcodes);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.