You are here

private function Translator::loadFallbackCatalogues in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/symfony/translation/Translator.php \Symfony\Component\Translation\Translator::loadFallbackCatalogues()
1 call to Translator::loadFallbackCatalogues()
Translator::initializeCatalogue in vendor/symfony/translation/Translator.php

File

vendor/symfony/translation/Translator.php, line 417

Class

Translator
Translator.

Namespace

Symfony\Component\Translation

Code

private function loadFallbackCatalogues($locale) {
  $current = $this->catalogues[$locale];
  foreach ($this
    ->computeFallbackLocales($locale) as $fallback) {
    if (!isset($this->catalogues[$fallback])) {
      $this
        ->doLoadCatalogue($fallback);
    }
    $fallbackCatalogue = new MessageCatalogue($fallback, $this->catalogues[$fallback]
      ->all());
    $current
      ->addFallbackCatalogue($fallbackCatalogue);
    $current = $fallbackCatalogue;
  }
}