示例#1
0
 /**
  * {@inheritdoc}
  */
 public function addFallbackCatalogue(MessageCatalogueInterface $catalogue)
 {
     foreach ($catalogue->getDomains() as $domain) {
         foreach ($catalogue->getMessages($domain) as $id => $translation) {
             if (false === $this->hasMessage($id, $domain)) {
                 $this->setMessage($id, $translation, $domain);
             }
         }
     }
     foreach ($catalogue->getResources() as $resource) {
         $this->addResource($resource);
     }
 }
示例#2
0
 /**
  * {@inheritdoc}
  */
 public function addCatalogue(MessageCatalogueInterface $catalogue)
 {
     foreach ($catalogue->getMessages() as $domain => $messages) {
         $this->addMessages($messages, $domain);
     }
     foreach ($catalogue->getResources() as $resource) {
         $this->addResource($resource);
     }
 }