[Zope] i18n: how to use it in zpt's without CMF&Plone?

Bernd Dorn zope-mailinglist at mopa.at
Wed Sep 17 13:15:01 EDT 2003


Elena Schulz wrote:

> Hi,
> 
> how to use i18n (with Localizer) in zpt's without CMF&Plone? (State of the
> Art?)
> Is something like:
> <span i18n:translate="string:my_message" >
>  You are here:
> </span>
> possible? (zope 2.6.2 or 2.7. without CMF&Plone)
> 
> I found info about the use together with CMF/Plone but nothing without and I
> know how to use it this way:
> <span tal:replace="python: here.Localizer.i18n('my_message:')"
>  tal:omit-tag="">
>  Sie sind hier:
> </span>
> But I would prefer the i18n:namespace-syntax and flexibility. May be
> patching zope is an option for that?
> 
> -- Any hints would be great, Elena
> 
> 
> 
> 
> _______________________________________________
> Zope maillist  -  Zope at zope.org
> http://mail.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists - 
>  http://mail.zope.org/mailman/listinfo/zope-announce
>  http://mail.zope.org/mailman/listinfo/zope-dev )

hi

look at http://www.zope.org/Members/efge/TranslationService

this should answer your questions
and the following should work

<span tal:content="some/expresion" i18n:translate="">Sie sind hier</span>

the result of some/expresion is the msgid for the TranslationService and 
the default value

cheers, bernd






More information about the Zope mailing list