Include_default_lang: true and http_accept_language: true make my website monolingual


#1

Hi,

This is my first post here, so I want first to thanks the Grav team for creating this great CMS.

I just have a problem with the multi-language function.

My website is French and English. I did choose “include_default_lang: true” so the /fr doesn’t appear, only /en for English content.

I wanted to activate “http_accept_language: true” so it switch to the language of my visitor.
But as soon as I do that my website redirect me always on the /en, the english version.

That what I wanted, as my browser is not in French. But when I click on the French language link to see the French content, I’m still being redirected to English.

I manage to make it work by putting “include_default_lang: false” and having the /fr in the url.

Is it possible to use include_default_lang: true and http_accept_language: true together ?

Thanks for your help


#2

It seems that also in system.yaml :

include_default_lang: false
and
translations_fallback: true

Force the second language to be always selected.

I’ve try to comment the .htaccess without success,
I’ve also erased in site.yaml all custom redirects: and routes: