zope.i18n.interfaces.ITranslationDomain
(Name: "zope")

Component: zope.i18n.translationdomain.TranslationDomain

The Translation Domain utility

This interface provides methods for translating text, including text with interpolation.

When we refer to text here, we mean text that follows the standard Zope 3 text representation.

The domain is used to specify which translation to use. Different products will often use a specific domain naming translations supplied with the product.

A favorite example is: How do you translate Sun? Is it our star, the abbreviation of Sunday or the company? Specifying the domain, such as Stars or DaysOfWeek will solve this problem for us.

Standard arguments in the methods described below:

msgid
The id of the message that should be translated. This may be an implicit or an explicit message id.
mapping
The object to get the interpolation data from.
target_language
The language to translate to.
context
An object that provides contextual information for determining client language preferences. It must implement or have an adapter that implements IUserPreferredLanguages. It will be to determine the language to translate to if target_language is not specified explicitly.

Also note that language tags are defined by RFC 1766.

Attributes/Fields

* = required

Methods