Browser language priority problem on multi-language site

Hello. I have a problem with multi-language site behaviour. My site is in two languages: PL (default) and EN. When the priority on your browser is set that Polish language is first and English is second all things work good - you can easily switch between two available language versions.

Problem is when you browser has a priority set to show non-Polish (English) version of site first (the rest of the world ;)). Then you get English version of the site, and you cannot change it to Polish - it redirects you back to English.

This is my laguage config. Is there something obvious that I’m missing?

languages:
  supported:
    - pl
    - en
  default_lang: pl
  include_default_lang: false
  include_default_lang_file_extension: false
  content_fallback:
    pl: ['pl']
    en: ['en', 'pl']
  http_accept_language: true
  session_store_active: false

Your config is good. Have you try Langswitcher plugins before? you must try it, and try lookup skeletons example with multilang support.

have nice good day with GravCMS elite CMS Now and Foreever.

@goraht, Have a look at existing issue on Grav repo: Default language unreachable when preferred browser language is different

NB. It’s a Grav core issue, hence LangSwitcher will not solve this issue.

Ah I see… and you discovered it first :wink: Thank you. I see then no other way then just ignore it until it will be fixed, or change one of the settings (or both of them):

include_default_lang: false -> true

or

http_accept_language: true -> false

@goraht,

and you discovered it first

Not quite, it was Werdi who discovered it first. See this thread