function l10n_update_check_projects in Localization update 6
Same name and namespace in other branches
- 7.2 l10n_update.compare.inc \l10n_update_check_projects()
- 7 l10n_update.check.inc \l10n_update_check_projects()
Check latest release for project, language.
Parameters
$projects: Projects to check (objects).
$languages: Array of language codes to check, none to check all.
$check_local: Check local translation file.
$check_remote: Check remote translation file.
Return value
array Available sources indexed by project, language.
3 calls to l10n_update_check_projects()
- l10n_update_available_releases in ./
l10n_update.check.inc - Fetch update information for all projects / all languages.
- l10n_update_language_refresh in ./
l10n_update.check.inc - Language refresh. Runs a batch for loading the selected languages.
- l10n_update_project_refresh in ./
l10n_update.project.inc - Refresh projects after enabling/disabling modules
File
- ./
l10n_update.check.inc, line 61 - Reusable API for l10n remote updates using $source objects
Code
function l10n_update_check_projects($projects, $languages = NULL, $check_local = TRUE, $check_remote = TRUE) {
$languages = $languages ? $languages : array_keys(l10n_update_language_list());
$result = array();
foreach ($projects as $name => $project) {
foreach ($languages as $lang) {
$source = l10n_update_source_build($project, $lang);
if ($update = l10n_update_source_check($source, $check_local, $check_remote)) {
$result[$name][$lang] = $update;
}
}
}
return $result;
}