Translating a webpage
I'm wondering if someone can point me in the direction of some documentation that will tell me the best way to translate a web page into multiple languages using Zope Page Templates. In previous sites we've done in DTML we used a 'phrases' table in our MySQL database that contained phrases in each language the site required. We then used sql methods and a dtml-let statement to create a list of the phrases used on a certain page. I'm considering using the same basic idea for a page template site, but am wondering if there is a better way of doing translations. I've read about using .po files. Is there an easy way to hook these up to Zope? Any help would be greatly appreciated. Thanks.
Hi Sam,
I've read about using .po files. Is there an easy way to hook these up to Zope? Any help would be greatly appreciated. Yes, there are two alternatives:
PlacelessTranslationService and Localizer both of them allow you to use po files and negociate the language according to the browser settings or cookie based (Localizer allows you also a path based negociation ie: /en for english, /de for german). If you only need to translate label messages and small paragraphs, then PlacelessTranslationService will be the way. Localizer can also do the same as its competitor; additionaly you can also define localized contents (ie: you can have two versions of a page and they will be selected according to the browser language). Some days ago, I also read something about integrating the Zope 3.x translation technolgy into zope 2 using five; it seems interesting as well: http://worldcookery.com/files/fivei18n Regards Josef
participants (2)
-
Josef Meile -
Sam Boggess