-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
i18n: autodetect browser language #33
Comments
As far as I know it can be achieved from the hosting provider side. No coding needed. Just saying. |
This could be done either by an .htaccess configuration or a small javascript. In any case, we'll need to set a cookie when the user selects a language, to ensure user preferences prevail. Also, I'd limit this to the home page, for now. Thoughts @andreslucena ? |
I have it working on #51 - the thing is that it doesn't allow to choose english on the homepage :( |
Adding redirects on home for i18n autodetecting browser settings - closes #33
Revert "Adding redirects on home for i18n autodetecting browser settings - closes #33"
There was an incompatiblity with this issue and #27 (regarding autodetecting browser language and changing lang on same page). |
So i did some research. When the user changes the language, you can create a cookie called nf_lang or nf_country with the language/country code, and this will take presedence over browser language/ip based redirects. So in this case, selecting English should create an nf_lang=en cookie and on every other language change, you can simply delete the cookie. |
hi @passatgt thanks for your contribution! I hope @andreslucena or @zuzust or @htmlboy can build from that. |
When I get to decidim.org I get the website on english. It should autodetect from my browser settings (catalan or spanish).
The text was updated successfully, but these errors were encountered: