django/djangoproject.com

Support switching languages on non-docs sites

Open

#883 ouverte le 12 mars 2019

Voir sur GitHub
 (6 commentaires) (1 réaction) (0 assignés)Python (1 100 forks)user submission
docsgood first issuei18n

Métriques du dépôt

Stars
 (2 001 stars)
Métriques de merge PR
 (Merge moyen 7j 20h) (25 PRs mergées en 30 j)

Description

Right now, the docs site has a handy language switcher in the bottom right corner. For other sites, (I think) the only supported way of switching languages is to have your browser send an Accept-Language header. While this might work fine I think something that allows the user to pick a language (perhaps defaulting to whatever Accept-Language is) would be preferred

Google also recommends unique URLs for each language a page is served in (which is not currently supported, except for the docs site):

https://support.google.com/webmasters/answer/182192

(I guess we could do what they've done and add a query string to the URLs.)

What do others think? Should we steal the language switcher from the docs site and use it on other sites? Or add some new widget for this? Or just leave things the way they are?

Guide contributeur