function l10n_update_build_server_pattern in Localization update 7.2
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.
- "%release": Project version.
- "%core": Project core version.
- "%language": Language code.
Return value
string String with replaced placeholders.
1 call to l10n_update_build_server_pattern()
- l10n_update_source_build in ./
l10n_update.translation.inc - Builds abstract translation source.
File
- ./
l10n_update.translation.inc, line 308 - Common API for interface translation.
Code
function l10n_update_build_server_pattern($project, $template) {
$variables = array(
'%project' => $project->name,
'%release' => $project->version,
'%core' => $project->core,
'%language' => isset($project->langcode) ? $project->langcode : '%language',
);
return strtr($template, $variables);
}