2

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 get 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
JeremyP
  • 84,577
  • 15
  • 123
  • 161
fbmd
  • 730
  • 6
  • 22
  • That looks odd. The link should already point at `en/article?set_language=en` or somesuch, I think. Do things look right when you check under "Translate > manage translations"? – Ulrich Schwarz Apr 06 '11 at 11:12
  • 1
    They do. For `/de/texte`, there is *Bestehende Übersetzungen: English (en): articles* `/en/articles`. I can even click that link, and it takes me to the right place. Still, the language selector has `/de/texte/switchLanguage?set_language=en`. – fbmd Apr 06 '11 at 12:41

3 Answers3

6

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.

  • Thanks, that explained a lot. I use the Plone Classic Theme with some customisations here and there, but no extra browser layer. The order is already "custom, LinguaPlone". There also is a LinguaPlone folder at /portal_skins/. Could a product like Blogging or Captchas interfer with this? Edit: uninstalled them - no change. – fbmd Apr 07 '11 at 13:06
2

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 ?

jphoude
  • 333
  • 1
  • 2
  • 8
  • That sounds reasonable. But what action can I take, where to I start? `buildout` does not return any error, so where and how can I check what's going wrong? – fbmd Apr 07 '11 at 05:45
  • Also, when I change the option in `portal_languages` to display flags instead of language names, it does so. If I disable `Use cookie for manual override`, the language selector is not rendered. Isn't this a hint that this part is working? – fbmd Apr 07 '11 at 06:52
0

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.

fbmd
  • 730
  • 6
  • 22