You are here

private function Translator::doLoadCatalogue in Zircon Profile 8

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

File

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

Class

Translator
Translator.

Namespace

Symfony\Component\Translation

Code

private function doLoadCatalogue($locale) {
  $this->catalogues[$locale] = new MessageCatalogue($locale);
  if (isset($this->resources[$locale])) {
    foreach ($this->resources[$locale] as $resource) {
      if (!isset($this->loaders[$resource[0]])) {
        throw new \RuntimeException(sprintf('The "%s" translation loader is not registered.', $resource[0]));
      }
      $this->catalogues[$locale]
        ->addCatalogue($this->loaders[$resource[0]]
        ->load($resource[1], $locale, $resource[2]));
    }
  }
}