function locale_translation_build_server_pattern

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

Build path to translation source, out of a server path replacement pattern.

Parameters

object $project: Project object containing data to be inserted in the template.

string $template: String containing placeholders. Available placeholders:

  • "%project": Project name.
  • "%version": Project version.
  • "%core": Project core version.
  • "%language": Language code.

Return value

string String with replaced placeholders.

Deprecated

in drupal:11.4.0 and is removed from drupal:13.0.0. Use \Drupal::service(LocaleSource::class) ->buildServerPattern($project, $template) instead.

See also

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

File

core/modules/locale/locale.translation.inc, line 252

Code

function locale_translation_build_server_pattern($project, $template) {
  @trigger_error(__FUNCTION__ . '() is deprecated in drupal:11.4.0 and is removed from drupal:13.0.0. Use \\Drupal::service(LocaleSource::class)->buildServerPattern($project, $template) instead. See https://www.drupal.org/node/3569330', E_USER_DEPRECATED);
  return \Drupal::service(LocaleSource::class)->buildServerPattern($project, $template);
}

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