Live data from Hacker News

Who uses Accept-Language header?

serpapi.com

41–50 of 71 posts

Re: Who uses Accept-Language header?

#41

Earlier quoted context omitted.

What works surprisingly often is setting language to en-UK instead. Apparently many sites consider en-US to be some default that they can safely ignore, but en-UK to be a deliberate choice. Nowadays I use that not just for the browser, but for my phone and computer too.

I presume you mean en-GB (British English) not en-UK?

Yes indeed. And I suppose any other non-US English version should do the same.

Re: Who uses Accept-Language header?

#42
post #31

Even Accept-Language headers aren't really a particularly good solution. I might prefer some sites in Danish, but others I'd like to have en English. Unless browsers allow you to set language on a per site basis, we still aren't really capturing the nuances of language preference. Accept-Language could be a pretty good indicator of a persons language skills, but it's just to far into the browsers settings to be somet…

> but it's just to far into the browsers settings to be something that a normal user would adjust. Most users are on mobile these days, and picking your preferred language is an unskippable step of setting up a new phone. My hunch is that accept-language is far more accurate today than it used to be.

I do not ever use any OS or other software in my native language, however I do want most non-technical websites to display in it when possible. How do I communicate that?

Re: Who uses Accept-Language header?

#43
post #31

Even Accept-Language headers aren't really a particularly good solution. I might prefer some sites in Danish, but others I'd like to have en English. Unless browsers allow you to set language on a per site basis, we still aren't really capturing the nuances of language preference. Accept-Language could be a pretty good indicator of a persons language skills, but it's just to far into the browsers settings to be somet…

> but it's just to far into the browsers settings to be something that a normal user would adjust. Most users are on mobile these days, and picking your preferred language is an unskippable step of setting up a new phone. My hunch is that accept-language is far more accurate today than it used to be.

My hunch is that Accept-Language became the best way to determine a user's language about the time it became common to bring a laptop while traveling. People use arguments today against Accept-Language that have been wrong for decades.

EDIT: Best initial way to determine a user's language. MDN is right that overrides should be possible. https://developer.mozilla.org/en-US/docs/Web/HTTP/Content_ne...

Re: Who uses Accept-Language header?

#44

Even Accept-Language headers aren't really a particularly good solution. I might prefer some sites in Danish, but others I'd like to have en English. Unless browsers allow you to set language on a per site basis, we still aren't really capturing the nuances of language preference. Accept-Language could be a pretty good indicator of a persons language skills, but it's just to far into the browsers settings to be somet…

[deleted]

Re: Who uses Accept-Language header?

#45
post #31

Even Accept-Language headers aren't really a particularly good solution. I might prefer some sites in Danish, but others I'd like to have en English. Unless browsers allow you to set language on a per site basis, we still aren't really capturing the nuances of language preference. Accept-Language could be a pretty good indicator of a persons language skills, but it's just to far into the browsers settings to be somet…

> but it's just to far into the browsers settings to be something that a normal user would adjust. Most users are on mobile these days, and picking your preferred language is an unskippable step of setting up a new phone. My hunch is that accept-language is far more accurate today than it used to be.

accept-language is a list. Do I want English or Spanish first? What if your content is better in the second? I'm much better at English than Spanish, but I'm better at Spanish than the AI translation to English. Plus I may be watching that video in German to learn German even though I'm so bad at German I wouldn't put it in...

Accept-language is accurate, but just isn't easy change it which is required to handle all the possible situations and get the right answer. Still everything else is worse.

Re: Who uses Accept-Language header?

#46
post #31

Even Accept-Language headers aren't really a particularly good solution. I might prefer some sites in Danish, but others I'd like to have en English. Unless browsers allow you to set language on a per site basis, we still aren't really capturing the nuances of language preference. Accept-Language could be a pretty good indicator of a persons language skills, but it's just to far into the browsers settings to be somet…

> but it's just to far into the browsers settings to be something that a normal user would adjust. Most users are on mobile these days, and picking your preferred language is an unskippable step of setting up a new phone. My hunch is that accept-language is far more accurate today than it used to be.

No they don't? I have never got that at least. It asks for my UX language, not for my preferred languages for websites. My preferred UX language is always English since most translations to Swedish are horrible while Swedish made websites are best read in Swedish and not a potentially bad English translation.

Re: Who uses Accept-Language header?

#47

There are two situations that I hate: 1. I have a different IP than usual, so all the sites change to that country - including language, news and search results(Google), etc, even though my browser sets a list of Accept-Language options. It's still me, I know you track me, so why? 2. Changing a multi-language website to a different country, also changes the language to that country, even though by browser sends an Ac…

I hate it too.

Not only languages change, but many other things like date formatting, mathematical formatting (using commas rather than dots breaks few things around) and currencies too! And it's a pain to fix as settings often collide and with many applications abusing microfrontends you can even end up in conflicts on the very same pages.

Google's the worst offender on all of its services and not just search, youtube, etc (even for work, their forced localization breaks Google Sheets in multiple ways), even my goddamn portoflio prices get converted in the local currency or using google flights shows me prices in the local currency forcing me to open more tabs to convert non stop.

And changing it to my own, on so many different services is such a pain.

But I know why this happens as a developer who advocated multiple times with my managers to not forcefully try to compute the language/region/market of users without giving them a simple button flag to change locale: product people don't listen and would rather have thousands of "ifs" that eventually will fail rather than listen to reason.

Hell, as a developer I have all my software and preferred language to english, even though I'm italian. And sometimes I use VPNs!

Even Amazon at times gives me some text in a language, and some other in others (completely unrelated like German) on the very same page.

Just keep it simple.

Re: Who uses Accept-Language header?

#49
Yeah, but Accept-Language is not always good idea.

E.g. I prefer to view some websites in English and some in my native. Generally I prefer all the websites that are not from my country domain to be in English. Setting up Accept-Language per website is annoying.

The most annoying part is when my local website sees "en" there, and decides to show me English version.

It is easier to just add e.g. `.jp` to domain, than to find out where browser sets up Accept-Language.

Re: Who uses Accept-Language header?

#50

There are two situations that I hate: 1. I have a different IP than usual, so all the sites change to that country - including language, news and search results(Google), etc, even though my browser sets a list of Accept-Language options. It's still me, I know you track me, so why? 2. Changing a multi-language website to a different country, also changes the language to that country, even though by browser sends an Ac…

"It's still me, I know you track me, so why?"

They're not tracking you for your benefit.

Though one does have to think that clickthrough rates and all similar metrics do go plunging when you serve a user a page in the wrong language.

Post reply on HN