Live data from Hacker News

Who uses Accept-Language header?

serpapi.com

31–40 of 71 posts

Re: Who uses Accept-Language header?

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

Re: Who uses Accept-Language header?

#32

Earlier quoted context omitted.

You’re talking about the Accept-Language header . They are asking about the cookie. To answer the question, yes, normally you would have some kind of manual switcher that sets the cookie. Please don’t use flags for this, because flags indicate countries, not languages. Don’t make a Russian-speaking Ukrainian seek out the Russian flag, and don’t make an English-speaking Irish person seek out the Union Flag.

> To answer the question, yes, normally you would have some kind of manual switcher that sets the cookie. Please don’t use flags for this, because flags indicate countries, not languages. Don’t make a Russian-speaking Ukrainian seek out the Russian flag, and don’t make an English-speaking Irish person seek out the Union Flag. Yes, why make things easy. :-) Controversial opinion: Flags are great as a visual aid, short…

Its not just a matter of hurt feelings, it has multiple problems. If it was just hurt feelings I might agree with you, but it is ambiguous, inconsistent and fails to cover many cases. That is bad UI.

What flags to you suggest people use for Cantonese, Tamil, Arabic and Xhosa?

Why use the Union flag for English? If the language is en-US surely an American flag would be more accurate? You can then use the British flag for en-GB. However, if you offer Welsh you would use the Welsh flag (and presumably the Scottish one for Scottish Gaelic, although I cannot recall ever seeing that) so it would surely be more consistent to use the English flag for British? Even for or generic English?

Re: Who uses Accept-Language header?

#33

Earlier quoted context omitted.

Indeed, google never behaves for me, always hands me language localized to my ip, even though my Accept-Language contains "en-US,en;q=0.9" (the local language is my native one, but i find using services or software that are originally in English translated to my (non-PIE) language awful, even anger-inducing). For search i have had &hl=en added to the search parameters since forever.

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.

One drawback I remember was that sometimes experimental features in some app are available strictly for the US (i.e. "vanilla") version, presumably simply because lack of localisation blocks it for "other" versions. (Sadly cannot recall concrete program, but I think it was some web browser.)

Re: Who uses Accept-Language header?

#34

Earlier quoted context omitted.

Indeed, google never behaves for me, always hands me language localized to my ip, even though my Accept-Language contains "en-US,en;q=0.9" (the local language is my native one, but i find using services or software that are originally in English translated to my (non-PIE) language awful, even anger-inducing). For search i have had &hl=en added to the search parameters since forever.

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 found that insufficient.

Setting something that's very clearly custom (e.g. en,sv meaning English then Swedish) works for me, as I don't live in Sweden.

Re: Who uses Accept-Language header?

#35

Earlier quoted context omitted.

Indeed, google never behaves for me, always hands me language localized to my ip, even though my Accept-Language contains "en-US,en;q=0.9" (the local language is my native one, but i find using services or software that are originally in English translated to my (non-PIE) language awful, even anger-inducing). For search i have had &hl=en added to the search parameters since forever.

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?

Re: Who uses Accept-Language header?

#36

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…

1.b. When somehow they identify you’ve change IPs the first time, and now that you are home, there’s still some sticky session that doesn’t get cleared without purging all cookies for the domain.

[deleted]

Re: Who uses Accept-Language header?

#37

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 not a high priority task and is in the backlog gathering dust ;)

Re: Who uses Accept-Language header?

#38
I always design i18n with a preferred language on a customer profile and I use Accept-Language to pre-select it on registration. Browser settings must be respected, of course, but there are also non-browser communications that can use this preference. It is very small amount of work if done at the start of the project rather than as feature upgrade.

Re: Who uses Accept-Language header?

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

> […] picking your preferred language is an unskippable step of setting up a new phone.

This does not address, or more precisely it even prevents the notion of:

> I might prefer some sites in Danish, but others I'd like to have en English.

, i.e. what you set in your OS or UA (browser) is always one preferred and optionally some fallback languages. I second that granular per-site control would be preferable for me either: some texts I prefer in my mother tongue (news, non-tech encyclopedic articles), the rest, namely technical documentation I prefer in English. (Also, I have very bad experiences with localised GUIs, where 1. familiarity with English "original" vastly helps when searching and 2. translations tend to range from bad to hilariously comical.)

But I must admit that most websites serving of content in multiple languages, support client-side pref pretty well, so the situation is not so terrible, in my experience.

Yet, the problematic of content negotiation and user agent author (provider) information passing is interesting and I'd say even under-engineered, and currently terribly suffer from security (anti-tracking) constraints.

(Lately, there was some development in "Client Hints": https://developer.mozilla.org/en-US/docs/Web/HTTP/Client_hin... )

Re: Who uses Accept-Language header?

#40
In my experience Accept-Language header is pretty unreliable. It tends to just be one of a few values. Between people never updating it, proxies stripping it, people concerned it will make them easier to fingerprint, etc.

Also, form an implementation standpoint, translation is a lot of work to get right and some companies may not do it for all languages so they may support the header but just not support the language choice you have. Yelp being a weird example where they apparently have the Japanese translation on another site.

Combine all that together and it's not usually worth the effort to do it unless you have specific legal requirements or high demand from users.

Post reply on HN