Skip to content
Grav 2.1 is out: every page speaks Markdown. Read the announcement →

Include_default_lang: true and http_accept_language: true make my website monolingual

Started by aroz 8 years ago · 1 replies · 619 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 blu3prince, 4 days ago
1 76 10 hours ago
Support · by complanar, 7 days ago
6 161 2 days ago
Support · by Rick Beebe, 7 days ago
2 121 4 days ago
Support · by alex, 5 days ago
2 103 4 days ago
Support · by Marcel, 2 weeks ago
1 155 5 days ago