[Zope-CMF] translation of CMF 1.1. Request for comments

Joachim Werner joe@iuveno-net.de
Fri, 22 Jun 2001 00:37:42 +0200


> There are several other attempts to be found on the Zope page how to solve
> the translation task. They seem to focus on a sentence by sentence
> translation which is, to my mind, much more complicated than to translate
a
> whole file.

A sentence-by-sentence or "phrase-by-phrase" translation system has one
important advantage: You just have to translate a word or phrase once. The
only situation where this might not be a good idea is if you have identical
phrases with different meanings (e.g. "Sun" for the computer company, "Sun"
for the star, and "Sun" for the abbreviated form of "Sunday"), but that can
be handled using different labels like "Sun_weekday".

We at iuveno have taken ZBabel from Andrew Milton and improved it a bit.
Right now Stephan Richter is posting the new version that does not need an
SQL database backend any more.

ZBabel has some really advanced features, e.g. you can add "ZBabel objects"
that behave like a single image or file, but in fact are containers that
contain versions in different languages (e.g. for GIF text buttons).

You can even translate phrases that contain DTML variables and get the
variables in the right order. And you can localize date formats etc.

We also had a try to put the translation engine into the "var" tag. It
worked pefectly, but you get massive problems with recursion because
dtml-var not only displays variables but also methods that contain of
methods that use variables etc. ... (It is still in the code, but you have
uncomment it. Do so and f* up your Zope within seconds ;-))

> Doing the translation as I propose it would be relatively easy to check
for
> changes when files are updated. Since the original file is still part of
the
> _int copy we can split it of and diff it against the updated dtml file.
> Although this does not provide for automatic merging of code changes into
> the translated parts it should make the process much easier.

ZBabel has a nice feature for getting the translations merged into an
existing system: You just distribute your files as usual and in addition to
that you make a dump of your translation database ("Babel Tower") and import
it to the target system. This way not only the new files are translated, but
all translated phrases that are used in them can be reused somewhere else
...

If you find bugs or look for additional features in ZBabel, feel free to
contact us!
(mailto: srichter@iuveno-net.de)

The newest version is here:
http://www.zope.org/Members/srichter/Products/ZBabel/ZBabel-2-0-0a2.tgz/view

Cheers

Joachim