MessageCatalogueInterface
interface MessageCatalogueInterface
MessageCatalogueInterface.
Constants
INTL_DOMAIN_SUFFIX |
|
Methods
Gets the catalogue locale.
Gets the domains.
Gets the messages within a given domain.
Sets a message translation.
Checks if a message has a translation.
Checks if a message has a translation (it does not take into account the fallback mechanism).
Gets a message translation.
Sets translations for a given domain.
Adds translations for a given domain.
Merges translations from the given Catalogue into the current one.
Merges translations from the given Catalogue into the current one only when the translation does not exist.
Gets the fallback catalogue.
Returns an array of resources loaded to build this collection.
Details
array
all(string $domain = null)
Gets the messages within a given domain.
If $domain is null, it returns all messages.
bool
defines(string $id, string $domain = 'messages')
Checks if a message has a translation (it does not take into account the fallback mechanism).
addCatalogue(MessageCatalogueInterface $catalogue)
Merges translations from the given Catalogue into the current one.
The two catalogues must have the same locale.
addFallbackCatalogue(MessageCatalogueInterface $catalogue)
Merges translations from the given Catalogue into the current one only when the translation does not exist.
This is used to provide default translations when they do not exist for the current locale.