Type IMessageCatalog
Interface
--+
|
IMessageCatalog
- Known Subclasses:
-
IGlobalMessageCatalog
A catalog (mapping) of message ids to message text strings.
This interface provides a method for translating a message or message id,
including text with interpolation. The message catalog basically serves
as a fairly simple mapping object.
A single message catalog represents a specific language and domain.
Therefore you will have the following constructor arguments:
language -- The language of the returned messages. This is a read-only
attribute.
domain -- The translation domain for these messages. This is a read-only
attribute. See ITranslationService.
When we refer to text here, we mean text that follows the standard Zope 3
text representation.
Note: The IReadMessageCatalog is the absolut minimal version required for
the TranslationService to function.
Class Variable Summary |
unicode |
domain = u'Domain\n\nThe domain the catalog is registere...
|
str |
getIdentifier = 'Return a identifier for this message ca...
|
str |
getMessage = 'Get the appropriate text for the given mes...
|
unicode |
language = u'Language\n\nThe language the catalog transl...
|
str |
queryMessage = 'Look for the appropriate text for the gi...
|
domain
-
- Type:
-
unicode
- Value:
u'Domain\n\nThe domain the catalog is registered for.'
|
|
getIdentifier
-
- Type:
-
str
- Value:
'''Return a identifier for this message catalog. Note that this
identifier does not have to be unique as several message catal\
og
could serve the same domain and language.
Also, there are no restrictions on the form of the identifier.
'''
|
|
getMessage
-
- Type:
-
str
- Value:
'''Get the appropriate text for the given message id.
An exception is raised if the message id is not found.
'''
|
|
language
-
- Type:
-
unicode
- Value:
u'Language\n\nThe language the catalog translates to.'
|
|
queryMessage
-
- Type:
-
str
- Value:
'''Look for the appropriate text for the given message id.
If the message id is not found, default is returned.
'''
|
|