On Tue, Aug 26, 2008 at 7:26 AM, Raphael Ritz
<[EMAIL PROTECTED]> wrote:
> [...]

So, here's a summary of what I tried based on the suggestion made by
Malthe Borch, Wichert Akkerman and Raphael Ritz:

I had a look at PloneLanguageTool to see if I could make it always return
"pt-br" as the preferred language, ignoring the browser settings. I can do this,
but I need to create a Plone Site first. What I'm trying to do is to force
a preferred language at Plone Site creation time, so the initial content (like
the Events and News folders) are translated to "pt-br", whatever the browser
settings of the user are. So, this solution does not works for me.

Then I tried the other approach: register a request layer marker interface
(e.g. IThemeSpecific), mark all request with this interface and register
a more specific adapter to this interface. I had a look at plone.theme and
plone.browserlayer to see how can I mark the requests with a marker interface.
I was able to mark the requests, but only the requests that happens inside
a Plone Site. These packages register handlers to the IBeforeTraverseEvent
for the IPloneSiteRoot interfaces. However, when navigating in the Zope Instance
root, outside any Plone Site, this event is not fired. Even if I register the
event handler like this:

  <subscriber for="*
                   zope.app.publication.interfaces.IBeforeTraverseEvent"
      handler=".handlers.my_handler" />

(I tried also with IApplication instead of *, but I hadn't any luck).

Any other ideas ?

Thanks for your suggestions, I learned a lot ;)

Regards,

-- 
Rafael Bruno Cavalhero de Oliveira <[EMAIL PROTECTED]>
Analista de Sistemas - Paradigma <http://www.paradigma.com.br>
Mestrando em Ciência da Informação - UFMG
http://rafaelb.objectis.net

_______________________________________________
Product-Developers mailing list
[email protected]
http://lists.plone.org/mailman/listinfo/product-developers

Reply via email to