I am still struggling getting LinguaPlone to work.
I have set up two language root folders /de
(for German) and /en
using /@@language-setup-folders
. I've created two folders, /de/texte/
and /en/articles
and defined the latter as translation of the former.
In portal_languages
in the ZMI I have set:
- Allowed languages: English, German
- Negotiation Scheme: [x] Use cookie for manual override
- all other options are unchecked
I do 开发者_如何学Cget a language selector rendered, but when I click on "English", which calls /de/texte/switchLanguage?set_language=en
, I get an English UI, but the location is still /de/texte
.
And even though the breadcrumbs say You are here: Home › texte, Home actually still points to /de
instead of /en
.
I've searched the web, but apart from some older rant on LinguaPlone I could not find what I've been possibly missing.
How do I configure LinguaPlone to actually load the linked translation when switching languages?
Edit:
- Plone 4.0.2
- Zope 2.12.13
- LinguaPlone 4.0
You have indeed the wrong language selector. There have been recurring reports about this but so far nobody found out why and how it happens. The correct language selector overrides the Plone default one by being defined for the ILinguaPloneProductLayer layer. This browser layer should be active as soon as you have the "LinguaPlone" skins folder as part of your skin layers.
You could try to reorder the skin layers in your theme by going to "http:///portal_skins/manage_propertiesForm" and moving LinguaPlone to the top, right after "custom".
If you have a theme of your own and defined any extra browser layers, those could possibly interfere as well, but it's hard to tell in what exact ways.
I think you have the wrong language selector.
There is a basic language selector viewlet that is shipped with Plone ("plone.app.i18n.locales.languageselector" in plone/app/i18n/locales/browser/configure.zcml). It just switches the language of the Plone interface (not the content). This is the language selector that links to "switchLanguage".
When you install LinguaPlone, it overrides the Plone language selector with it's own. The LP selector is not supposed to link to "switchLanguage", but the URL of the content item in the target language (with the ?set_language parameter). This viewlet is defined in Products/LinguaPlone/browser/configure.zcml
Perhaps LP is not correctly installed, or something is overriding the viewlet ?
The reason for this behaviour is that LinguaPlone 4.0 is not compatible with the "Plone Classic Theme" on Plone 4.0.2.
Switching to the "Sunburst Theme" solves the problem: the language selector links point to the correct URIs then.
精彩评论