3

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?

Giacomo Spettoli
  • 4,476
  • 1
  • 16
  • 24
mede
  • 81
  • 6

1 Answers1

4

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.

Laurence Rowe
  • 2,909
  • 17
  • 20
  • @mede: If you find an answer helpful, you can mark it as 'accepted'; it'll give both you and the answerer some reputation points and guides future visitors to the best answer too. See [How does accepting an answer work?](http://meta.stackexchange.com/q/5234) – Martijn Pieters Aug 03 '12 at 18:25