django/djangoproject.com

Support switching languages on non-docs sites

開放

#883 建立於 2019年3月12日

 (8 則留言) (1 個反應) (0 位負責人)Python (1,100 個分叉)user submission
docsgood first issuei18n

倉庫指標

星標
 (2,001 顆星)
PR 合併指標
 (平均合併 7天 20小時) (30 天內合併 25 個 PR)

描述

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?

貢獻者指南