Products.cmfplone: Set language for selected user

Created on 6 Apr 2016  路  9Comments  路  Source: plone/Products.CMFPlone

Wanted to try to install the English only for the admin.
But the site does not change the language remains a language which is default for the site.

A global problem with the use of languages other than the language of the site by default

2016-04-05_10-12-02

bug regression UX Editor confirmed

Most helpful comment

I have also confirmed this issue (in buildout.coredev).

All 9 comments

I have also confirmed this issue (in buildout.coredev).

@serge73 seems that something is happening on GitHub: I had the same problem on another issue I just created.

I think someone's moderated :)
Today disappeared double

@serge73 no, it happened to me also in the other issue; I had to write it 3 times.

@hvelarde, my findings for Plone 4.3.7 were that the user's language isn't ever used for language negotiation. In fact, there was nowhere (that I could find) in Plone's core where the user's language preference is used at all -- except for the author page (Products/CMFPlone/skins/plone_content/author.cpt), where it just shows the string (eg Main language: es).

Looking now at Plone 5, the language negotiation is the same (see https://github.com/plone/plone.i18n/blob/master/plone/i18n/negotiate/negotiate.py) -- it doesn't currently consult the member's language property under any circumstances.

I had tried to add this support to Plone (unsure if I tried 4.x or 5) but the result was that only half the calls to the LanguageUtility (for one given request) were considered authenticated -- plone.api.user.get_current() was sometimes returning None, even though I was logged in. I attempted to figure this out but had no success, so that's where I'd left it at the time.

In addition, if user negotiation is going to be added (which I feel is the expected behaviour, and the core point of this ticket), then to avoid confusion, the available languages in user preferences should be limited to those allowed on the portal (eg Language control panel, global i18n language setting etc). Otherwise, someone could select Espanol for their user on an English-only site and end up seeing no change to their UI -- as is the case right now.

this seems to be a hard issue then, @plone/framework-team could you evaluate it?

Hi all,
I'm developed a product for use on a multilingual site that ...

provides a "best efforts" translations override for backend editors who only speak English, yet have to maintain multilingual Plone sites. It will override as many translations as possible without being seen by public users.

As @davidjb mentions above it's hard to make a distinction between strings used externally & those not, but this product contains my best efforts so far at doing so. Please take a look and let me know if you think it useful.... I'm happy for it to move to the collective if it is deemed so.

https://github.com/jowent/collective.i18noverridebackend.en

@serge73 @davilima6

Plone - 5.2.1 has the same issue too

Was this page helpful?
0 / 5 - 0 ratings