Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set language for selected user #1510

Open
serge73 opened this issue Apr 6, 2016 · 9 comments
Open

Set language for selected user #1510

serge73 opened this issue Apr 6, 2016 · 9 comments

Comments

@serge73
Copy link

serge73 commented Apr 6, 2016

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

@hvelarde
Copy link
Member

hvelarde commented Apr 6, 2016

@davilima6
Copy link
Member

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

@hvelarde
Copy link
Member

hvelarde commented Apr 6, 2016

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

@serge73
Copy link
Author

serge73 commented Apr 7, 2016

I think someone's moderated :)
Today disappeared double

@hvelarde
Copy link
Member

hvelarde commented Apr 7, 2016

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

@davidjb
Copy link
Contributor

davidjb commented Apr 8, 2016

@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.

@hvelarde
Copy link
Member

hvelarde commented Apr 8, 2016

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

@djowett
Copy link

djowett commented Jun 1, 2016

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

@raeuz
Copy link

raeuz commented Jun 20, 2020

Plone - 5.2.1 has the same issue too

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants