[Zope-CMF] How to translate CMF, first summary

Juan David Ibáñez Palomar palomar@sg.uji.es
Mon, 2 Jul 2001 10:33:28 +0200 (METDST)


Hi Robert,

> 
> The following sentence has to be rearranged when translated to German:
> 
> <p>This item is in <b>&dtml-review_state;</b> state.</p>
> becomes:
> <p>Der Status des Elementes ist : <b>&dtml-review_state;</b></p>
> 
> This only works when I translate Text and html code together. I can not
> separate the two.
> This is what I call to translate screen wise.(not all situations are that
> straightforward the code might be some paragraphs long)
> (is tere an other way to do it ??)
> 

The same way:

 <p><dtml-var "gettext('This item is in <b>%s</b> state.') % review_state"></p>

The german .po file would look:

 msgid "This item is in <b>%s</b> state."
 msgstr "Der Status des Elementes ist : <b>%s</b>"

Obviously you can put the <b></b> out:

 <p><dtml-var "gettext('This item is in %s state.') % ('<b>%s</b>' % review_state)"></p>


[...]
> You must know the context to translate. So we are back to translate screen
> wise.
> 

Being aware of the problem you'll try to write sentences as least
ambiguous as possible so only a few of them will really have different
translations. And there're workarounds for that, such as using ids for
sentences and provide also the english "translation".

We're not inventing anything new here, these are the same problems lot of
people has faced for years.


[...]
> 
> Will DC do it?
> We know their enthusiasm towards such maters. It does not exist.
> This is understandable for two reasons. First with making Zope easy
> translatable DC does not gain anything with their customers. And secondly DC
> is an American company. I believe Americans just have a poor approach
> towards such matter. I do not mean that in any way cynical it is just a
> question of why should they. Understandably American companies only start to
> worry about translation when a significant part of their business comes from
> non English speaking countries. And since DC does not ...
> 

Well, this a question for DC, but I think they're very interested in
i18n support as the SALO project, currently on hold, shows:

  http://dev.zope.org/Wikis/DevSite/Projects/SkinnableAndLocalizableObjects

I expect more movement on this once Zope 2.4 is released, which includes
Python 2.1, which has two important new features: unicode support and the
gettext module.


[...]
> 
> Conclusion:
> We need to persuade DC to add translation hooks as I mentioned, and do the
> dtml translation by hand.
> 

I understand there's lot of people that needs i18n *now*, so a quick
solution could and should be implemented.

<advertisement>
And it would be great if the CMF developers looked at the Localizer
product and internationalized the CMF using it :)
</advertisement>

Seriously, I don't oppose to the CMF developers implementing your
solution, but hope Zope will use gettext to provide i18n support
in the future.


Cheers,
jdavid