Hello,

I have a Drupal 8 install with English configured as default language, plus French as second language.

How can I select language with browser language detection, but also change the URL and the language selector block ?

Example : If my browser is in French, I want to be redirected to www.mysite.com/fr, but keeping the possibility to go to the english version with the language selector.

Currently, if I'm selecting "browser detection" plus "URL" in the language detection panel, the website stays in the language of my browser, even if I select "English" in the language switcher, or change the URL manually...

Thanks for your help !

EDIT : I have finally solved the problem, here's how :

- I provided a prefix for both languages in URL detection parameters (even for default language)
- Then I realized my problem wasn't quite solved, as the menus still behaved erraticaly. I had to go the the menu administration, and select "Not specified" on the menu language settings, which defaulted to "English" before.

Comments

Jej’s picture

Merci, this solved my problem... I cannot really understand why I had so much eratic problems with language selection. Sometime English, sometime French. Now it seems to work thanks to the second trick (main menu language unspecified). I don't understand what the relation with the language selection...