You are here

private function Translator::doLoadCatalogue in Plug 7

2 calls to Translator::doLoadCatalogue()
Translator::initializeCatalogue in lib/Symfony/translation/Translator.php
Translator::loadFallbackCatalogues in lib/Symfony/translation/Translator.php

File

lib/Symfony/translation/Translator.php, line 429

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]));
    }
  }
}