You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Could we provide the user the right language more automatically? #82
I mean, when a french browser hits docs.python.org/ it could be redirected to docs.python.org/fr/ in a clean way.
I'm sure some people prefer reading the english version anway, so we need to find a smart way of doing it, a way such that nobody can complain about it.
On the backend side the server could make use of Accept-Language header. Though we probably should only redirect on first "encounter" and display a note at the top, like "We've redirected you to your browser preferred language." or similar. Then, if user switches back to English, we should not redirect anymore (probably a boolean cookie would be enough). Otherwise the redirections could be frustrating for users.
Though we probably should only redirect on first "encounter" and display a note at the top, like "We've redirected you to your browser preferred language."
It could also be opt-in instead of opt-out, i.e. show a "Do you want to be redirected to the docs?" message when we detect a preferred language that is not English.
Reacted by Stan Ulbrych, Maciej Olko and Manuel Kaufmann
Activity
JulienPalard commentedon Dec 11, 2019
cc @christopheNan
StanFromIreland commentedon Jan 24, 2025
We could use the language the browser is in. See developer.mozilla.org
It would be quite easy to implement.
m-aciek commentedon Jan 24, 2025
On the backend side the server could make use of
Accept-Languageheader. Though we probably should only redirect on first "encounter" and display a note at the top, like "We've redirected you to your browser preferred language." or similar. Then, if user switches back to English, we should not redirect anymore (probably a boolean cookie would be enough). Otherwise the redirections could be frustrating for users.m-aciek commentedon Jan 24, 2025
It's worth noting that MDN is experimenting with “Remember language” feature. It should help with user preference for redirection behaviour.
ezio-melotti commentedon Jan 31, 2025
It could also be opt-in instead of opt-out, i.e. show a "Do you want to be redirected to the docs?" message when we detect a preferred language that is not English.