Class n.i.Translator(object):

Part of nevow.i18n View Source View In Hierarchy

A gettext-like Translator for Nevow.

The major difference between this and naive gettext is that with Translator, the actual translation is done as part of Nevow's flattening process, allowing per-user settings to be retrieved via the context.
Instance Variablestranslatorthe actual translation function to use.
argspositional arguments to pass to translator.
kwargskeyword arguments to pass to translator.
gettextFunctionIf using the default translator function, name of GNU gettext function to wrap. Useful for 'ungettext'.
Line # Kind Name Docs
137 Method __init__ Initialize.
160 Method __call__ Translate a string.
def __init__(self, **kwargs): (source)
Initialize.
Parameterskwargskeyword arguments for the translator function.
Unknown Field: keywordtranslatorthe translator function to use.
gettextFunctionThe GNU gettext function to wrap. See class docstring.
def __call__(self, *args, **kwargs): (source)
Translate a string.
Parametersargsarguments to pass to translator, usually the string to translate, or for things like ungettext two strings and a number.
kwargskeyword arguments for the translator. Arguments given here will override the ones given at initialization.
Returnsa placeholder that will be translated when flattened. (type: PlaceHolder )
API Documentation for Nevow, generated by pydoctor.