function locale_translation_batch_update_build

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

Builds a batch to check, download and import project translations.

Parameters

array $projects: Array of project names for which to update the translations. Defaults to all translatable projects.

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

array $options: Array of import options. See locale_translate_batch_build().

Return value

array Batch definition array.

Deprecated

in drupal:11.4.0 and is removed from drupal:13.0.0. Use \Drupal::service(LocaleFetch::class) ->batchUpdateBuild($projects, $langcodes, $options) instead.

See also

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

File

core/modules/locale/locale.fetch.inc, line 33

Code

function locale_translation_batch_update_build($projects = [], $langcodes = [], $options = []) {
  \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(LocaleFetch::class)->batchUpdateBuild($projects, $langcodes, $options) instead. See https://www.drupal.org/node/3572345', E_USER_DEPRECATED);
  return \Drupal::service(LocaleFetch::class)->batchUpdateBuild($projects, $langcodes, $options);
}

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