On Sun, Sep 09, 2007 at 11:20:34PM +0200, Roger Ineichen wrote: > Hi Andreas > > > Betreff: [Zope3-Users] z3c.form, german umlauts on buttons > > > > [...] > > > My app is german only and if I was to introduce i18n I would still > > make german the primary language and English the second, > > i. e. I would still want > > > > @button.buttonAndHandler(_(u'Ändern')) > > I never did use German in the code and can't say that this > should work. But why do you use german as the default language? > > I recommend to use english in the code and use german as a > translated language. > > I'm not really sure if we should support german Umlauts > at the python leven and take care for encoding. I guess > this is what translation should be used for. Or not?
Hi Roger, OK, let me put it this way: If I really have to use i18n for those umlauts on buttons (and that's what I might have to do if nothing changes) then you might be right in that it may be better to use English as the default language and German as one of the languages looked up by i18n, i. e. to use: @button.buttonAndHandler(_(u'Change')) and have i18n find "Ändern" as the German translation for "Change". At least I guess this is what gettext docs would suggest. The other way around might not even be possible due to some gettext restriction - not sure about that. However, this particular app of mine will never be an international app, it will always be German only. It is just a simple app for a customer of mine here in Berlin, that's it, I just don't plan to make it a sophisticated multilanguage app. No need to negoatiate the languages accepted by the browser etc. - And till now, as long as I was using formlib, it was a simple app: as I pointed out, I could use something like this in formlib: actions[u'actions.aendern'].label=u'Ändern' It just feels awkward to make it more complex then was neccessary in the past. Besides, I can use umlauts in page templates without i18n - as utf-8 is the default there, just not on the buttons, this seems an assymetry to me. Also I specified the coding of my python file # -*- coding: utf-8 -*- which in py3k will be the default anyway, and buttonAndHandler() in z3c.form expects an unicode param, i. e. u'...', not just a plain string '...', doesn't it make sense to allow umlauts here - if ascii only is accepted then a plain string would have done it just as well. -Andreas _______________________________________________ Zope3-users mailing list Zope3email@example.com http://mail.zope.org/mailman/listinfo/zope3-users