Skip to content
● Meet Grav Guard: keep every Grav site you run secure and up to date, all from one place. Free for up to 3 sites. Read more →

Include_default_lang: true and http_accept_language: true make my website monolingual

Started by aroz 8 years ago · 1 replies · 728 views
8 years ago

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

last edited 12/31/18 by aroz
8 years ago

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:

last edited 12/31/18 by aroz

Suggested topics

Topic Participants Replies Views Activity
Support · by TomW, 2 weeks ago
8 228 10 hours ago
Support · by alex, 2 months ago
8 667 1 day ago
Support · by Supple, 5 days ago
1 98 2 days ago
Support · by TomW, 1 week ago
3 160 3 days ago
Support · by TomW, 6 days ago
2 106 6 days ago