hi *,

        i read with much interest this thread about ZBabel, because
it seems to do something like the Translator product. 

> Suppose web site in source language has something like this:
> 'Click <A href="{fieldX(someVar.A)}">here</A>, for {fieldY(someVar.B)}'
> With suitably horrific DTML instead of ' ' and {}.
> Rendered english result would be, for some particular dynamic instance of
> someVar:
> 'Click <A href="http://www.zope.org/">here</A> for Zope'
> Translator for language X decides to reverse the positions of fieldA and
> fieldB and use 3 separate substrings, because it is too abrupt for that
> language, so translates to something like:
> 'If you would like {fieldY(someVar.B)}, click <A
> href="{fieldX(someVar.A)}">this link</A>, please'
> There are now 3 substrings in the translation because it would be rude not
> to start or end with something like "please" in language X, and it reads
> better with the fields reversed in that language.
> Final rendered result becomes (in language X):
> 'If you would like Zope, click <A href="http://www.zope.org/">this link</A>,
> please'
> depending on the particular value of someVar at the time.

ok. Translator allows for that using just one (1) translated string.
you create a translator and put inside it a translated item (naming
it my_localized_text, for example):


        Click <A href="<dtml-var "someVar.A">">here</A>, 
                for <dtml-var "someVar.B">      


        If you would like <dtml-var "someVar.B">, click <A
                href="<dtml-var "someVar.A">">this link</A>, please.

Then in the main body of your page you put:

        <dtml-lvar my_localized_text>

and you get exactly what you want.

BTW, Translator also allow you to take an url of a localized object,
to do stuff like:

        <img src="<dtml-lvar first_logo_png url>" usemap=...>

At now, the Transaltor does not support at now an easy way to generate
catalogues (as ZBabel does, i think.) I'll add that in a future release.
Or, if the author of ZBabel wants, we can try to merge the two projects
to and produce a single, usefull product.


Federico Di Gregorio
MIXAD LIVE System Programmer                           [EMAIL PROTECTED]
Debian GNU/Linux Developer & Italian Press Contact        [EMAIL PROTECTED]
  99.99999999999999999999% still isn't 100% but sometimes suffice. -- Me

Zope maillist  -  [EMAIL PROTECTED]
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-dev )

Reply via email to