function locale_translation_project_list

locale_translation_project_list()

Fetch an array of projects for translation update.

Return value

array Array of project data including .info.yml file data.

File

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

Code

function locale_translation_project_list() {
  $projects = &drupal_static(__FUNCTION__, array());
  if (empty($projects)) {
    $projects = array();

    $additional_whitelist = array(
      'interface translation project',
      'interface translation server pattern',
    );
    $module_data = _locale_translation_prepare_project_list(system_rebuild_module_data(), 'module');
    $theme_data = _locale_translation_prepare_project_list(\Drupal::service('theme_handler')->rebuildThemeData(), 'theme');
    $project_info = new ProjectInfo();
    $project_info->processInfoList($projects, $module_data, 'module', TRUE, $additional_whitelist);
    $project_info->processInfoList($projects, $theme_data, 'theme', TRUE, $additional_whitelist);

    // Allow other modules to alter projects before fetching and comparing.
    \Drupal::moduleHandler()->alter('locale_translation_projects', $projects);
  }
  return $projects;
}

© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!modules!locale!locale.compare.inc/function/locale_translation_project_list/8.1.x