Skip to content
Grav 2.0 is officially stable. Read the announcement →
Support

Include_default_lang: true and http_accept_language: true make my website monolingual

Started by aroz 8 years ago · 1 replies · 505 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 Duc , 4 hours ago
1 25 4 hours ago
Support · by Thomas, 1 week ago
3 103 13 hours ago
Support · by Anna, 3 days ago
2 99 1 day ago
Support · by Justin Young, 1 day ago
1 66 1 day ago
Support · by Duc , 1 week ago
2 101 6 days ago