Hello everyone,

I want to add language namespace to 'zope.app.traversing.namespace' so someone can override the language settings through URL, like this:


http://site.com/++language++ru/path

I guess this feature would be useful for sites with selectable languages.


Implementation notes:

The simplest code is:

    def traverse(self, name, ignored):
        self.request._environ["HTTP_ACCEPT_LANGUAGE"] = name
        return self.context

but I don't like it since it seems like a hack. Maybe I need to provide new IUserPreferredLanguages adapter and then return the old one when the request is closed?


Thoughts?

--
Dmitry Vasiliev (dima at hlabs.spb.ru)
    http://hlabs.spb.ru
_______________________________________________
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com

Reply via email to