[Zope-Checkins] CVS: Zope/lib/python/Products/PageTemplates/tests/output - CheckI18nTranslate.html:1.1.2.1 CheckI18nTranslateHooked.html:1.1.2.1

Florent Guillaume fg@nuxeo.com
Sun, 15 Sep 2002 20:43:31 -0400


Update of /cvs-repository/Zope/lib/python/Products/PageTemplates/tests/output
In directory cvs.zope.org:/tmp/cvs-serv6172/lib/python/Products/PageTemplates/tests/output

Added Files:
      Tag: Zope-2_6-i18n-branch
	CheckI18nTranslate.html CheckI18nTranslateHooked.html 
Log Message:
Added a hookable global translation service to PageTemplates, with tests.

A third-party product wishing to add a translation service simply has to
do:
    from Products.PageTemplates.GlobalTranslationService import \
         setGlobalTranslationService
    setGlobalTranslationService(mytranslationservice)
A translation service only needs one method, whose signature is:
    def translate(self, domain, msgid, mapping=None,
                  context=None, target_language=None)
It must return a translated string based on msgid and the domain, and
optionally the other arguments. The translated string can be Unicode.


=== Added File Zope/lib/python/Products/PageTemplates/tests/output/CheckI18nTranslate.html ===
<html>
<body>
<head>
   <p>foobar</p>
</head>
</body>
</html>


=== Added File Zope/lib/python/Products/PageTemplates/tests/output/CheckI18nTranslateHooked.html ===
<html>
<body>
<head>
   <p>[foo](bar)</p>
</head>
</body>
</html>