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" />

1. is the return value correct? i.e. is a tuple ok?
   should it be ('DE') or ('de') - tried both to no avail :(
2. does the translation also work with page template files?

regards, juergen

On Wed, January 18, 2006 14:28, Lennart Regebro wrote:
> On 1/18/06, Jürgen Herrmann <[EMAIL PROTECTED]> wrote:
>> does the zope/five/i18n machinery tell anything about it's startup
>> phase (finding message catalogs etc.) in the logs or while watching
>> runzope output?
>
> Nope. It would probably be good if the registerTranslations statement
> printed logs of what it found.
>
>> - how can i set the target language for the translation in the zpt?
>
> That's tricky! :) You need either Localizer or the plone tool for that
> now, I think. But it's mentioned in the documentation. By default it
> just picks the language from the list of languages in your browser, I
> think?
>
>> - do i have to compile the .pos to .mos by hand?
>
> Yes.
>
> --
> Lennart Regebro, Nuxeo     http://www.nuxeo.com/
> CPS Content Management     http://www.cps-project.org/
> _______________________________________________
> 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 )
>


_______________________________________________________________________

>> 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 )

Reply via email to