locale_translation_build_server_pattern($project, $template)
Build path to translation source, out of a server path replacement pattern.
object $project: Project object containing data to be inserted in the template.
string $template: String containing placeholders. Available placeholders:
string String with replaced placeholders.
function locale_translation_build_server_pattern($project, $template) { $variables = array( '%project' => $project->name, '%version' => $project->version, '%core' => $project->core, '%language' => isset($project->langcode) ? $project->langcode : '%language', ); return strtr($template, $variables); }
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!modules!locale!locale.translation.inc/function/locale_translation_build_server_pattern/8.1.x