Jako / LangRouter

Language context router for use with Babel in MODX Revolution
https://jako.github.io/LangRouter/
GNU General Public License v2.0
10 stars 4 forks source link

Feature Request: Save last loaded cultureKey in a cookie #15

Closed muzzwood closed 5 years ago

muzzwood commented 7 years ago

Currently LangRouter detects the browser language and routes the user to the most appropriate context. This is great but would be even better if it could set a cookie (perhaps a system setting option to enable) and remember the last selected language. If there was no language selected then it falls back to detecting browser language.

My reasoning for this is that in Hong Kong for example many people use English browsers but would prefer to read a website's content in Chinese. This means that every time they return to the site they need to select the preferred language again.

Jako commented 7 years ago

You know this: http://www.techtza.com/2017/10/how-to-change-browser-language.html

That way, you could set the preferred language of the browser content. And thats the HTTP_LANGUAGE_ACCEPT variable LanguageRouter is using.

You could see your browser language settings here: https://aruljohn.com/language.php