function locale_translation_load_sources locale_translation_load_sources(array $projects = NULL, array $langcodes = NULL) Loads cached translation sources containing current translation status. 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 with <project name>:<language code>. See also  locale_translation_source_build() File
 core/modules/locale/locale.translation.inc, line 102 Common API for interface translation.  Code function locale_translation_load_sources(array $projects = NULL, array $langcodes = NULL) {
  $sources = array();
  $projects = $projects ? $projects : array_keys(locale_translation_get_projects());
  $langcodes = $langcodes ? $langcodes : array_keys(locale_translatable_language_list());

  // Load source data from locale_translation_status cache.
  $status = locale_translation_get_status();

  // Use only the selected projects and languages for update.
  foreach ($projects as $project) {
    foreach ($langcodes as $langcode) {
      $sources[$project][$langcode] = isset($status[$project][$langcode]) ? $status[$project][$langcode] : NULL;
    }
  }
  return $sources;
}


    
{'path': 'public/docs/drupal~8/core-modules-locale-locale.translation.inc/function/locale_translation_load_sources/8.1.x.html', 'source': 'DevDocs.IO'}