function locale_translation_check_projects

Check for the latest release of project translations.

Parameters

array $projects: Projects to check (objects).

string $langcodes: Array of language codes to check for. Leave empty to check all languages.

Return value

array Available sources indexed by project and language.

1 call to locale_translation_check_projects()
locale_translation_manual_status in drupal/core/modules/locale/locale.pages.inc
Page callback: Checks for translation updates and displays the translations status.

File

drupal/core/modules/locale/locale.compare.inc, line 308
The API for comparing project translation status with available translation.

Code

function locale_translation_check_projects($projects, $langcodes = NULL) {
  module_load_include('batch.inc', 'locale');
  if (config('locale.settings')
    ->get('translation.use_source') == LOCALE_TRANSLATION_USE_SOURCE_REMOTE_AND_LOCAL) {

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

    // Retrieve and save the status of local translations only.
    locale_translation_check_projects_local($projects, $langcodes);
  }
}