Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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.


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...


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


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.


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...




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.


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.


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.


No need for any add-ons or extensions, you can set it the browser directly, although most websites these days ignore it anyway.


The option should be in your OS or browser settings.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: