You are here

public function MessageCatalogue::get in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/symfony/translation/MessageCatalogue.php \Symfony\Component\Translation\MessageCatalogue::get()

Gets a message translation.

Parameters

string $id The message id:

string $domain The domain name:

Return value

string The message translation

Overrides MessageCatalogueInterface::get

File

vendor/symfony/translation/MessageCatalogue.php, line 105

Class

MessageCatalogue
MessageCatalogue.

Namespace

Symfony\Component\Translation

Code

public function get($id, $domain = 'messages') {
  if (isset($this->messages[$domain][$id])) {
    return $this->messages[$domain][$id];
  }
  if (null !== $this->fallbackCatalogue) {
    return $this->fallbackCatalogue
      ->get($id, $domain);
  }
  return $id;
}