News for hackers. Stuff that matters.
Re:Open-Sourcing our Firmware by uoaei on Friday January 21, 2022 @02:09PM (#30028439)
I'm surprised things like "preferred language" aren't built into HTTP yet, seems to have a natural home in the user-agent corner of that world.
Re:Open-Sourcing our Firmware by AcidBurn on Friday January 21, 2022 @02:27PM (#30028719)
I believe HTTP has had this feature since 1999 as the Accept-Language header defined in the HTTP/1.1 RFC[0].

As for why it does not get used, MDN suggests[1] it's because changing it may lead to fingerprinting but there are likely other historical reasons.

[0]: https://datatracker.ietf.org/doc/html/rfc2616#section-14.4

[1]: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Ac...

Re:Open-Sourcing our Firmware by nightfeather on Friday January 21, 2022 @02:16PM (#30028552)
Actually there is a header for this purpose [Accept-Language on MDN](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Ac...).

But some sites just don't care about it and try detect this base on other information.

edit: formatting

Re:Open-Sourcing our Firmware by dskloet on Friday January 21, 2022 @02:22PM (#30028653)
I believe Google (used to?) ignores it if it's set to only English because that's too often the default. If that's the case, the work around is to set a second preferred language.
Re:Open-Sourcing our Firmware by oever on Friday January 21, 2022 @02:44PM (#30028958)
Accept-Language: fr-CH, fr;q=0.9, en;q=0.8, de;q=0.7, *;q=0.5

https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Ac...

Re:Open-Sourcing our Firmware by U1F984 on Friday January 21, 2022 @02:18PM (#30028593)
Re:Open-Sourcing our Firmware by dskloet on Friday January 21, 2022 @02:20PM (#30028613)
Re:Open-Sourcing our Firmware by uoaei on Friday January 21, 2022 @02:25PM (#30028701)
Surprise! Not everyone on HN is in webdev. I don't know much about how this all works but surveyed my user-agent-switcher utility and found no such language options.
Re:Open-Sourcing our Firmware by banana_giraffe on Friday January 21, 2022 @02:35PM (#30028844)
It's actually controlled by the Languages setting in your browser. Both Chrome and Firefox let you set the list of languages sent in the header, along with the order.

Doesn't exactly do a lot of good. Sites tend to ignore it, at least from what I've seen.

Re:Open-Sourcing our Firmware by uoaei on Friday January 21, 2022 @02:38PM (#30028877)
The first thing I do on any new installation is peruse the settings and tweak to my liking. It seems I missed that option, being privileged to have English as a mother tongue.
Re:Open-Sourcing our Firmware by 4cao on Friday January 21, 2022 @02:33PM (#30028820)
No need for any add-ons or extensions, you can set it the browser directly, although most websites these days ignore it anyway.
Re:Open-Sourcing our Firmware by dskloet on Friday January 21, 2022 @02:31PM (#30028795)
The option should be in your OS or browser settings.