예제 #1
0
 /**
  * @param string $locale
  * @return string[][]
  * @throws UnknownLocaleException
  */
 protected function getDictionaries($locale)
 {
     if (is_null($this->dictionaries)) {
         $this->dictionaries = $this->loadDictionaries($this->dictionaryPaths, $this->localizer->getAvailableLocales());
     }
     if (!array_key_exists($locale, $this->dictionaries)) {
         throw new UnknownLocaleException(sprintf('Cannot translate for unknown locale %s', $locale));
     }
     return $this->dictionaries[$locale];
 }