Ticket #551 (new defect)
Opened 4 years ago
Page view does not update when site language changed using LinguaPlone
|Reported by:||tom||Owned by:||brent|
This may be a LinguaPlone? bug, but I am capturing it here so we can address it.
It is possible to have two or more front page translations, but the problem I am seeing is that as you switch from one language to another only the left nav and the top nav change. The current page you are viewing does not automatically load the translated page in the language you have selected.
Recreating the issue: From the home page (front-page), login as admin or manager and select "translate into" to translate into another language. This will create another page that is linked to the original English front page. The problem I see is that when you select a language other than English (let's say Korean), only the top nav and left nav changes. But you are still looking at the English front page until you click on "home" again (top nav). Now you will see the translated page. This is the same for other content pages as well. When you change to a different language, for some reason the page doesn't switch immediately to that language. Only the top nav and left nav change to the language you have picked, and you see translated pages after you navigate to a new page (using top nav or left nav).
Possible fix from Guillaume de la Torre:
I will try to help those guys that have a problem with language switching in eduCommons. I think this is not an eduCommons problem, it looks much more a LinguaPlone? problem, or similar.
We have an eduCommons 2.3.1 site where the multilingual issue works fine. Universidad Oberta de Catalunya too. But Universidad del País Vasco and Universidad de Valencia sites (eduCommons 2.3.1, too) work wrong.
I was looking for differences, with these results: our “select type input” is something like this:
<select onchange="window.location=this.options[this.selectedIndex].value"> <option value="translated-object-url/view?set_language=en">English</option> <option selected="selected" value="original-object-url/view?set_language=es">Español</option> </select>
Their “select type input” are something like this:
<select style="font-size: 94%;" onchange="window.location='original-object-url/switchLanguage?set_language=' + this.options[this.selectedIndex].value"> <option value="en">English</option> <option selected="selected" value="es">Spanish</option> <option value="ca">Catalan</option> </select>
As you can see, in this code only the “parameter” is switched, not the “object”. So the logical behavior, in these cases, it’s that only top and left navs change, isn´t it?
The code that’s builds the selects in our eduCommons is the LinguaPlone? template (/portal_skins/LinguaPlone/global_languageselector) that I attach to this email. The data for composing the HTML piece of code comes from a Python script (/portal_skins/LinguaPlone/languageSelectorData), attached too.
Not the template, neither the script, are in the ZMI of universities having this problem. I couldn´t access the file system of servers, so I don´t know if there are differences between theirs and ours. Our LinguaPlone? installed product is 0.9.0 - $Revision: 10093 $
I hope this helps.
-- Guillermo de la Torre Oficina OCW-UPM