My site has English, Spanish and Portuguese. The detection order is URL, Browser, User, Default (English).

All is fine for English users, but if a user is set up with their default language set to Spanish, they can never use the language switch to switch to English - it still displays the site in Spanish.

Comments

plach’s picture

Status: Active » Postponed (maintainer needs more info)
mikel1’s picture

Go to https://www.exposenewsnetwork.com and register an account. If the account selected language is English, you can select any language form the language selector menu at the top left of the site. If you set the default language for the account to Portuguese (or Spanish), then the "English" selection on the language selection menu displays in that language rather than English, and there is no way to select English as the language for the site.

mavimo’s picture

Problem/Motivation

User with defined language in user profile (user/[UID]/edit#edit-language ) can't chage switch in entity translation language. Only language selected as default language in user profile is used, also if URL language detection mode is before user preference.
This issue is not valid for admin (UID = 1) user, maybe some access permission involved?

Proposed resolution

Disable User language detection mode.

Remaining tasks

Investigate motifation of language detection failure.

mikel1’s picture

From your last comment, I'm not sure I've described the exact behavior properly.

In my settings, detection method is set to URL, user, browser, site default in that order.

A user who selects a language setting equal to the site default can change to any language on the site.
A user who selects a language other than the site default can change to any language on the site except for the site default.

I believe the reason is that the language change is implemented by a URL redirection for non site default languages, but for the site default there is no indication in the URL, and so the user settings are used.

I think there needs to be a way to pass the site default language either through the URL or through another mechanism that takes precedence over the user selected language.

I hope that's a clearer description.

mikel1’s picture

...and I may have answered my own question - I think putting session before user in the Content Language Detection fixes the problem. I had assumed that putting "Interface" first and having session in the interface language detection would work, but that doesn't seem to be the case.