You are here

function l10n_update_build_string in Localization update 7

Same name and namespace in other branches
  1. 6 l10n_update.inc \l10n_update_build_string()

Build abstract translation source, to be mapped to a file or a download.

Parameters

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

$template: String containing place holders. Available place holders:

  • '%project': Project name.
  • '%release': Poject version.
  • '%core': Project core version.
  • '%language': Language code.
  • '%filename': Project file name.

Return value

string String with replaced place holders.

3 calls to l10n_update_build_string()
l10n_update_build_projects in ./l10n_update.project.inc
Rebuild project list
l10n_update_source_build in ./l10n_update.check.inc
Build abstract translation source, to be mapped to a file or a download.
l10n_update_source_check_download in ./l10n_update.check.inc
Check remote file object.

File

./l10n_update.inc, line 642

Code

function l10n_update_build_string($project, $template) {
  $variables = array(
    '%project' => $project->name,
    '%release' => $project->version,
    '%core' => $project->core,
    '%language' => isset($project->language) ? $project->language : '%language',
    '%filename' => isset($project->filename) ? $project->filename : '%filename',
  );
  return strtr($template, $variables);
}