[openstreetmap/openstreetmap-website] Add a locale selector (PR #3618)
Andy Allan
notifications at github.com
Wed Jul 27 14:02:57 UTC 2022
I'm not super keen on this, since browsers are in charge of dealing with language requests. There should (in theory, I know I know I know) be no need for language selectors. And so I find it surprising and a bit disappointing that in the linked diary post, the OP complains loudly about seeing a page in English when they have their browser set up to request pages in English. :shrug:
However, if we choose to add one, then
* It should only appear for logged out users. We already have a system for customising language preferences for logged in users.
* I don't think there's a need for logged out users to be able to reset the override, they can just choose a different language
* We should reconsider how the logged-in language preferences work, since we'll have a nicer UI for logged out users (a dropdown) than for logged in users (a somewhat cryptic text field).
I also think we should stopped filling in the language preferences automatically. I don't agree with the logic of grabbing the browser preferences supplied when they first create an account, and using that to override their browser prefs from that point on in perpetuity. If I switch my browser to request FR then I expect the site to respect that by default, unless I've specifically chosen differently. So I think:
* We should leave the language preference blank by default, and only set it when the user does so explicitly
* For logged in users, we should use: prefs (if set) -> browser (if set) -> en
* For logged out users we should use: override (if set) -> browser (if set) -> en
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/3618#issuecomment-1196803909
You are receiving this because you are subscribed to this thread.
Message ID: <openstreetmap/openstreetmap-website/pull/3618/c1196803909 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20220727/3b542049/attachment.htm>
More information about the rails-dev
mailing list