/** * {@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); } }
/** * {@inheritdoc} */ public function addCatalogue(MessageCatalogueInterface $catalogue) { foreach ($catalogue->getMessages() as $domain => $messages) { $this->addMessages($messages, $domain); } foreach ($catalogue->getResources() as $resource) { $this->addResource($resource); } }