Package zope :: Package i18n :: Package interfaces :: Class ITranslationDomain
[show private | hide private]
[frames | no frames]

Type ITranslationDomain

Interface --+
            |
           ITranslationDomain


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.

Class Variable Summary
unicode domain = u'Domain Name\n\nThe name of the domain this ob...
str translate = 'Return the translation for the message refe...

Class Variable Details

domain

Type:
unicode
Value:
u'Domain Name\n\nThe name of the domain this object represents.'       

translate

Type:
str
Value:
'''Return the translation for the message referred to by msgid.

        Return the default if no translation is found.

        However, the method does a little more than a vanilla translat\
ion.
        The method also looks for a possible language to translate to.
        After a translation it also replaces any $name variable variab\
...                                                                    

Generated by Epydoc 2.1 on Fri Jun 24 12:01:24 2005 http://epydoc.sf.net