django/djangoproject.com

Support switching languages on non-docs sites

Open

#883 建立於 2019年3月12日

在 GitHub 查看
 (6 留言) (1 反應) (0 負責人)Python (2,001 star) (1,100 fork)user submission
docsgood first issuei18n

描述

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?

貢獻者指南