Package zope :: Package i18n :: Module simpletranslationdomain :: Class SimpleTranslationDomain
[show private | hide private]
[frames | no frames]

Type SimpleTranslationDomain

object --+
         |
        SimpleTranslationDomain

Known Subclasses:
TranslationDomain

This is the simplest implementation of the ITranslationDomain I could come up with.

The constructor takes one optional argument 'messages', which will be used to do the translation. The 'messages' attribute has to have the following structure:

{('language', 'msg_id'): 'message', ...}

Note: This Translation Domain does not use message catalogs.
Method Summary
  __init__(self, domain, messages)
Initializes the object.
  translate(self, msgid, mapping, context, target_language, default)
See interface ITranslationDomain
    Inherited from object
  __delattr__(...)
x.__delattr__('name') <==> del x.name
  __getattribute__(...)
x.__getattribute__('name') <==> x.name
  __hash__(x)
x.__hash__() <==> hash(x)
  __new__(T, S, ...)
T.__new__(S, ...) -> a new object with type S, a subtype of T
  __reduce__(...)
helper for pickle
  __reduce_ex__(...)
helper for pickle
  __repr__(x)
x.__repr__() <==> repr(x)
  __setattr__(...)
x.__setattr__('name', value) <==> x.name = value
  __str__(x)
x.__str__() <==> str(x)

Class Variable Summary
Implements __implemented__ = <implementedBy zope.i18n.simpletransla...
ClassProvides __providedBy__ = <zope.interface.declarations.ClassProvi...
ClassProvides __provides__ = <zope.interface.declarations.ClassProvide...
NoneType domain = None                                                                  

Method Details

__init__(self, domain, messages=None)
(Constructor)

Initializes the object. No arguments are needed.
Overrides:
__builtin__.object.__init__

translate(self, msgid, mapping=None, context=None, target_language=None, default=None)

See interface ITranslationDomain

Class Variable Details

__implemented__

Type:
Implements
Value:
<implementedBy zope.i18n.simpletranslationdomain.SimpleTranslationDoma\
in>                                                                    

__providedBy__

Type:
ClassProvides
Value:
<zope.interface.declarations.ClassProvides object at 0xb5ea936c>       

__provides__

Type:
ClassProvides
Value:
<zope.interface.declarations.ClassProvides object at 0xb5ea936c>       

domain

Type:
NoneType
Value:
None                                                                  

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