me again :) some more things i found out: 1. MyLanguages is instantiated on every http request but regardless of what i return (['DE'] or ['de']) i always get the english translation. weird?!
2. seems that only page templates served through an http request trigger the i18n stuff at all. if so, how can i circumvent this? (i want to generate xml and run it through trml2pdf to produce pdf output, which works excellent - but not with i18n) thanks for your help. regards, juergen On Wed, January 18, 2006 15:41, Martijn Faassen wrote: > Jürgen Herrmann wrote: >> just tried this: >> >> hacked in a MyLanguages in five's i18n.py: >> >> class MyLanguages(object): >> """ fake """ >> implements(IUserPreferredLanguages) >> >> def __init__(self, context): >> self.context = context >> >> def getPreferredLanguages(self): >> return ('DE') >> >> and in my overrides.zcml added: >> <adapter >> for="zope.publisher.interfaces.http.IHTTPRequest" >> provides="zope.i18n.interfaces.IUserPreferredLanguages" >> factory="Products.Five.i18n.MyLanguages" /> > > Oh, I see you already did what I did in the sample code above. > > Regards, > > Martijn > > _______________________________________________________________________ >> XLhost.de - eXperts in Linux hosting << Jürgen Herrmann Bruderwöhrdstraße 15b, DE-93051 Regensburg Fon: +49 (0)700 XLHOSTDE [0700 95467833] Fax: +49 (0)721 151 463027 WEB: http://www.XLhost.de _______________________________________________ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )