Question

I've developed a nice theme for Plone with Diazo, but I'm still unable to fix a translation problem that I have for those rules where I use a method="document" attribute in order to get contents from two different .pt file. Here is an example:

<replace css:theme="#sidebar1"
         css:content="#sidebar1"
         href="/menu"
         method="document"
         if-path="myhome"/>

It means the following: when I browse my .pt named myhome, I want to replace the sidebar1 div with contents defined into another page template named menu.pt. And this works fine; the problem is that both the page include some tal 'i18n:translate' instructions and, when I switch language, the translation is correctly loaded for myhome.pt, while it stays in the starting language for the menu.pt file; if I refresh the page or click again on the language selector, then all the translation strings are correctly loaded for the target language. I can't explain this strange behavior, did anyone fix a similar problem?

Was it helpful?

Solution

I've released plone.subrequest 1.6.3 which now copies over other request variables such as LANGUAGE_TOOL and LANGUAGE. Try updating your buildout with this version of plone.subrequest and see if it fixes the problem.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top