You are here

function l10n_update_check_projects in Localization update 7.2

Same name and namespace in other branches
  1. 6 l10n_update.check.inc \l10n_update_check_projects()
  2. 7 l10n_update.check.inc \l10n_update_check_projects()

Check for the latest release of project translations.

@todo Return batch array or NULL

Parameters

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

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

2 calls to l10n_update_check_projects()
drush_l10n_update_refresh in ./l10n_update.drush.inc
Callback for command l10n-update-refresh.
l10n_update_manual_status in ./l10n_update.admin.inc
Page callback: Checks for translation updates and displays the status.

File

./l10n_update.compare.inc, line 260
The API for comparing project translation status with available translation.

Code

function l10n_update_check_projects($projects = array(), $langcodes = array()) {
  if (l10n_update_use_remote_source()) {

    // Retrieve the status of both remote and local translation sources by
    // using a batch process.
    l10n_update_check_projects_batch($projects, $langcodes);
  }
  else {

    // Retrieve and save the status of local translations only.
    l10n_update_check_projects_local($projects, $langcodes);
    variable_set('l10n_update_last_check', REQUEST_TIME);
  }
}