You are here

function l10n_update_build_sources in Localization update 7.2

Build translation sources.

Parameters

array $projects: Array of project names. Defaults to all translatable projects.

array $langcodes: Array of language codes. Defaults to all translatable languages.

Return value

array Array of source objects. Keyed by project name and language code.

See also

l10n_update_source_build()

1 call to l10n_update_build_sources()
l10n_update_get_status in ./l10n_update.module
Gets the current translation status.

File

./l10n_update.translation.inc, line 133
Common API for interface translation.

Code

function l10n_update_build_sources($projects = array(), $langcodes = array()) {
  $sources = array();
  $projects = l10n_update_get_projects($projects);
  $langcodes = $langcodes ? $langcodes : array_keys(l10n_update_translatable_language_list());
  foreach ($projects as $project) {
    foreach ($langcodes as $langcode) {
      $source = l10n_update_source_build($project, $langcode);
      $sources[$source->name][$source->langcode] = $source;
    }
  }
  return $sources;
}