[Zope] Re: i18n/L10n support in zope2
Maurits van Rees
m.van.rees at zestsoftware.nl
Wed Apr 9 11:30:40 EDT 2008
harshad behere, on 2008-04-09:
> Dear list members,
>
> I am newbie/begineer in area of zope2 + i18n/L10n so please excuse me if
> this topic has already been discussed on the list, in that case can some
> one please point me to the past discussions/threads.
>
> After reading some basics about i18n+zope2, I have tried following -
> (zope version - Zope 2.9.7-final, python 2.4.4, win32
> and Placeless Translation Service - 1.3.7)
>
> Created simple page template -
><html>
><body>
><span i18n:domain="PlacelessTranslationService" i18n:translate="Reload
> this catalog">
> Reload this catalog
></span>
></body>
></html>
I would expect either:
i18n:translate=""
so that the string behind it ends up in the .pot file (and you don't
repeat yourself needlessly; also think what would happen when you
change one string but forget to change the other).
Or:
i18n:translate="reload_this_catalog"
or some other unique message id.
But the above code should work.
Well, using PlacelessTranslationService as i18n:domain is strange.
You should use the name of your own product/package.
> Modified language preferences for browsers - (Mozilla Firefox 2.0.0.4
> and MS-IE 7.0.5730.11) to set German [de] as primary langage.
>
> When I viewed above page in firfox got the corresponing german
> translation (Diesen Katalog neu einlesen) as specified in related .po
> file. But with MS-IE, no luck, gives same string - Reload this catalog
>
> So is it browser specific/dependable ?
It should not. Do you have a way to check which browser headers are
sent by IE and firefox and if they differ in the language preference?
> Another thing I tried is adding attribute i18n:target="cs", but it seems
> to have no effect, firefox gives german translation as per language
> settings as MS-IE gives same string - Reload this catalog
>
> Does it means that attribute target is not supported ? Is there any
> list/documentation about supported i18n attributes ?
I have never seen that attribute. From the top of my head, these i18n
attributes are used in zope: translate, domain, name and attributes.
> Also I was not able to find references/examples for DTML, does DTML
> supports i18n/L10n ?
No. At least, I do not think so, and this grep in a buildout did not
return any relevant results:
grep i18n $(find . -name '*dtml')
--
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