[Zope] Re: i18n/L10n support in zope2
harshad behere
hbehere at zeomega.com
Thu Apr 10 10:56:44 EDT 2008
>
> I tried changing domain in given example .po file (e.g. to
> "Domain=mydomain\n"), but it doesn't work even after doing "Reload
> catalog" for corresponding .po file object using PTS ZMI. I found
> reload catalog works if we modify message ids/text. Any idea how PTS
> manages this headers (like Domain/Content-Type etc) ? Is it possible
> to reload/refresh/rebuild this information ?
While working further I found following work aroud ( may not be on
correct path, but it works)
-- Edit the headings part (e.g Domain/Language etc) for .po files and
save file.
-- Make use of PTS ZMI to delete corresponding ZODB object of .po file.
-- Restart Zope.
I also found workaound for MSIE behaviour, include heading call
"X-Is-Fallback-For: ?????\n" in your .po file. For e.g -
"X-Is-Fallback-For: de-de\n".
After making change and updating sample page template - (English as
primary language for both browsers)
<html>
<body>
English -
<span i18n:domain="English" i18n:translate="">
Reload this catalog
</span>
<br>
German -
<span i18n:domain="Germany" i18n:translate="">
Reload this catalog
</span>
<br>
Czech -
<span i18n:domain="Czech" i18n:translate="">
Reload this catalog
</span>
<br>
</body>
</html>
gives following o/p
Mozilla Firefox 2.0.0.4 -
-- English - Reload this catalog
-- German - Reload this catalog
-- Czech - Reload this catalog
MS-IE 7.0.5730.11 -
-- English - Reload this catalog
-- German - Diesen Katalog neu einlesen
-- Czech - Znovu nacíst katalog
Interest thing is that MSIE respects selected language hierarchy where
as FireFox gives preference to the primary one.
Here are the headers -
Mozilla Firefox 2.0.0.4
HTTP_ACCEPT_LANGUAGE 'en-us,en;q=0.8,de;q=0.5,cs;q=0.3'
_pts_catalog_names_Germany_en []
_pts_catalog_names_Czech_en []
_pts_catalog_names_English_en []
_pts_negotiator_cache_language {('de', 'de-de', 'en'): 'en', ('en',):
'en', ('cs', 'cs-cz', 'en'): 'en'}
MS-IE 7.0.5730.11
HTTP_ACCEPT_LANGUAGE 'en-us,de-DE;q=0.7,cs-CZ;q=0.3'
_pts_catalog_names_Czech_cs-cz
['PlacelessTranslationService.i18n-pts-cs.po']
_pts_catalog_names_Germany_de-de
['PlacelessTranslationService.i18n-pts-de.po']
_pts_catalog_names_English_none []
_pts_negotiator_cache_language {('de', 'de-de', 'en'): 'de-de', ('en',):
None, ('cs', 'cs-cz', 'en'): 'cs-cz'}
Thank you,
Harshad.
More information about the Zope
mailing list