Plone 4.3: changing personal language preference doesn't affect UI

In Plone, I'm trying to have the core UI available in multiple languages on a per-user basis - for instance, the person tools menu, Site Setup, personal preferences, edit bar, etc - so non-native English speakers can use the same Plone site at the same time as English speakers. In this instance, I'm not worrying about the content on the site, just the core Plone UI.

If I change the site's language in Site Setup --> Language, the UI changes correctly after refreshing the page, but if I configure my user's language under Personal Preferences, there's no change and the language always continues to use the global site setting. From this, there doesn't appear to be an issue with translations being available as the global site setting changes the language. For note, my browser's language is English

Is this a bug, misconfiguration issue, or expected behaviour? If it's the later, is there a solution that provides per-user language in Plone 4.x? Also, if it is expected behaviour, what's the preferred language setting for in that case?

I've seen this post but the inference seems to be some form of misconfiguration. My config is using Plone 4.3.8, but I've also tried the default setup provided by Plock for Plone 4.3.x, as well as attempting to add zope_i18n_compile_mo_files true and zope.i18n [compile] (though I guessed these wouldn't do anything as the translations already appear to be present as the global site language is changeable).

Thanks!

I think you must go to ZMI and portal_languages tool where you will find a lot of additional options.
I don't remember if those options are always there or are only added when LinguaPlone add-on is installed.

do you have more languages enabled in your browser?

Yes, I'm testing with Spanish as the alternative language and I have:

  • Spanish as an alternative browser language (tried as first preference and not)
  • Espanol set as my Plone account's personal preferences language
  • English set as the Plone global site language

Doing more testing of portal_languages, I've found I can get the UI to change by:

  • Enabling the languages (eg Spanish, French, English etc) as allowed languages in portal_languages
  • Enabling Use browser language request negotiation. in Negotiation Scheme in portal_languages
  • Ensuring another language (eg Spanish) is set as first in my browser's language settings

This causes the UI to follow my browser preferences, which is a partial workaround, but will be cumbersome for users if they just want to use my site in their language.

It doesn't appear that my personal preference language is ever used under any settings I've tried from portal_language. For instance, I tried enabling all Negotiation Scheme settings (except Browser negotiation, which seems to take precedence), setting the personal language in my Plone user preferences as Francais, but French is never seen -- the site remains in English, using the Plone site setting.

For ease of use on the end-user's part, I was hoping Plone would work as other systems do -- for instance, this forum (Discourse) has a language setting in your user configuration, and the UI changes upon save & refresh. It doesn't require the user to change their browser settings, which would be useful because I will have users will be on machines/devices where they don't have such control. The end users I've had doing some testing on my Plone site were expecting this behaviour, which is why I've started looking into why this isn't the case in Plone.

From this testing, am I right in thinking personal user language has no bearing on UI in Plone? So, what does the personal language setting actually do -- it doesn't seem to affect anything out-of-the-box.

Thanks.

seems important to me to document your findings: http://docs.plone.org/adapt-and-extend/config/language.html

unfortunately we have no experience on multilingual sites.

Thanks @hvelarde, I'll certainly contribute to that page, but I'd just like to get a clearer picture on the situation first.

That said, going through the list of language negotiation options, none of them seem to utilise the user's language preference (confirmed in my testing in Plone 4.3). I did some more digging and in core Plone 4.3, it seems there's just one location that uses the setting: the author page (Products/CMFPlone/skins/plone_content/author.cpt) to simply show the string on the page (eg Main language: es). Beyond that, I can't find anywhere the user's language is used.

Seems like it wouldn't be a terrible amount of effort to add user-preference language negotiation into the PloneLanguageTool. Anyone got any thoughts on that?

It would be great to hear from anyone else in the community that works with multilingual sites though -- could save me a chunk of effort trawling through more code or writing a fix.

The Language in the personal preferences has no effect on the UI and as far as I know it never has. It is currently only an indication so that other people might know which language you speak.
Technically the language machinery could be changed to look at this setting, but currently it has no effect.

1 Like

Sorry, but that's stupid. We're currently using Plone in my organization, and I'd personally like to keep it that way but since the organization is multilingual and our new web coordinator doesn't speak all the official languages he's getting really frustrated with not understanding the languages, so if this isn't fixed we'll probably have to move towards a different CMS.

What is the problem with configuring Plone with another additional language which does not make the site as a whole multi-lingual but allowing you to change UI language as needed!?

-aj

Actually, I'm not a developer, just a web editor, so I don't fully understand what you're saying. The problem is that we need the frontend (in the sense of what anonymous users get to see) to be multilingual, but we want the editing menus (the elements that are only visible to logged-in users/editors) to be all in English (because that's the language the editors understand)

No idea what your setup looks like...which Plone version? What is installed for multilingual content etc.
If you need professional help (since you are not the related tech person in charge) then look for professional support (or contact me in private).

-aj

So you're saying that it should be possible, right? Because the web developer we're working with seems to be saying that it's not possible without hardcoding (and that comes with the risk of affecting the content as well)

This is likely possibly, perhaps with a customization but it depends on your setup and the skills of the person working on it.

-aj

You might be able to work around this by having the editors setting their language to english.
http://yoursite/@@personal-preferences

1 Like

@espenmn, isn't the whole discussion about the fact that this solution (which would be the obvious one) is not working?
See:

mauritsvanreesMay '16
The Language in the personal preferences has no effect on the UI and as far as I know it never has.

I do not know about multi-lingual content, but the UI typically is set up to honour the Accept-language header set by the browser according to the user preferences regarding the language. I assume that multi-lingual content, too, is typically set up to honour this specification.

At least the UI language selection is highly flexible (likely the content language selection, too) and the selection method can be changed quite easily. Should you not see the UI language following the browser language preference setup, then likely this has been done in your installation.

As mentioned, the way to have Plone present a web site's UI (labels, messages) in a different language is to set your language preference IN YOUR BROWSER.

Is that not working for this frustrated web coordinator of yours @Annegret?

And yes, please contact one of the listed Plone providers if you need a few hours of paid support or custom work:

https://plone.com/providers

No, Plone doesn't honor the browser's language preferences. Nor Plone's own Personal Preferences.

So there's really no way for Plone to present itself in different languages for different editors?

FGN

Are you sure? I just checked in my Plone 5.0.x instance -- and it speaks German with me (due to the browser language preferences). I am sure that Plone 4.3 can do this as well.

I'm using Plone 4.3.3 (4308), tested with Chrome and IE.

I've checked my browser language settings using an online detector, which says:

Plone's UI keeps showing in Portuguese, despite my preference for English.

For the record, the following settings are not meant to affect the present issue:

https://mysite.com/@@personal-preferences
https://mysite.com/portal_languages/manage_configForm

Thanks,
-FGN.