[Zope] Re: i18n/L10n support in zope2

Maurits van Rees m.van.rees at zestsoftware.nl
Thu Apr 10 04:26:50 EDT 2008


harshad behere, on 2008-04-10:
> Maurits,
>
> Thanks for the reply and suggestions.
>
> I tried i18n:translate="", it works fine.
>
> But if I change domain (e.g i18n:domain="mydomain") it doesn't work. Is 
> domain attribute is related to the domain specified in .po file, coz the 
> example .po file which comes with PlacelessTranslationService has domain 
> as 'PlacelessTranslationService' and if I used same it works fine.

Yes, the two should be the same.  But if you use this domain and other
people use it too because it is the standard example then you can get
conflicting translations.

> Actually I used i18n:target after reading - 
> http://wiki.zope.org/zope3/ZPTInternationalizationExamples. I do 
> understand that these are zope3 examples, but just thought of giving 
> try. While searching further I found - 
> https://bugs.launchpad.net/zope2/+bug/142771 which gives hint that 
> i18n:target not supported at least for Zope 2.9.7-final, python 2.4.4, win32

I have never seen it used anywhere.  My i18n experience is with Zope
2.9 and 2.10 though, not pure Zope 3, so maybe it works fine there.

> I will try to check for incoming browser headers, but does zope provides 
> any inbuilt method to do so ?

In Firefox you can use the livehttpheaders extension to check those.
I don't know if there is something similar to IE.

In zope this information should be visible somewhere in the request
object.  To display the complete request in a page template for
inspection you can probably do this:

  <div tal:replace="structure request" />

or simply this

  <div tal:content="request" />



-- 
Maurits van Rees | http://maurits.vanrees.org/
            Work | http://zestsoftware.nl/
"This is your day, don't let them take it away." [Barlow Girl]



More information about the Zope mailing list