public function MessageCatalogue::add in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/symfony/translation/MessageCatalogue.php \Symfony\Component\Translation\MessageCatalogue::add()
Adds translations for a given domain.
Parameters
array $messages An array of translations:
string $domain The domain name:
Overrides MessageCatalogueInterface::add
3 calls to MessageCatalogue::add()
- MessageCatalogue::addCatalogue in vendor/
symfony/ translation/ MessageCatalogue.php - Merges translations from the given Catalogue into the current one.
- MessageCatalogue::replace in vendor/
symfony/ translation/ MessageCatalogue.php - Sets translations for a given domain.
- MessageCatalogue::set in vendor/
symfony/ translation/ MessageCatalogue.php - Sets a message translation.
File
- vendor/
symfony/ translation/ MessageCatalogue.php, line 131
Class
- MessageCatalogue
- MessageCatalogue.
Namespace
Symfony\Component\TranslationCode
public function add($messages, $domain = 'messages') {
if (!isset($this->messages[$domain])) {
$this->messages[$domain] = $messages;
}
else {
$this->messages[$domain] = array_replace($this->messages[$domain], $messages);
}
}