Visitar URL original
Could we provide the user the right language more automatically? · Issue #82 · python/docsbuild-scripts · GitHub
Skip to content

Could we provide the user the right language more automatically? #82

Description

@JulienPalard

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.

Activity

  1. JulienPalard commented on Dec 11, 2019

    @JulienPalard
    MemberAuthor
  2. StanFromIreland commented on Jan 24, 2025

    @StanFromIreland
    Member

    We could use the language the browser is in. See developer.mozilla.org

    It would be quite easy to implement.

  3. m-aciek commented on Jan 24, 2025

    @m-aciek
    Contributor

    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.

  4. m-aciek commented on Jan 24, 2025

    @m-aciek
    Contributor

    It's worth noting that MDN is experimenting with “Remember language” feature. It should help with user preference for redirection behaviour.

    Image
  5. ezio-melotti commented on Jan 31, 2025

    @ezio-melotti
    Member

    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions