function locale_translation_status_save

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

Saves the status of translation sources in static cache.

Parameters

string $project: Machine readable project name.

string $langcode: Language code.

string $type: Type of data to be stored.

object $data: File object also containing timestamp when the translation is last updated.

Deprecated

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

See also

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

File

core/modules/locale/locale.module, line 542

Code

function locale_translation_status_save($project, $langcode, $type, $data) : void {
  @trigger_error(__FUNCTION__ . '() is deprecated in drupal:11.4.0 and is removed from drupal:13.0.0. Use \\Drupal::service(LocaleSource::class)->saveSource(). See https://www.drupal.org/node/3591660', E_USER_DEPRECATED);
  \Drupal::service(LocaleSource::class)->saveSource($project, $langcode, $type, $data);
}

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