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.
Who uses Accept-Language header?
61–70 of 71 posts
Re: Who uses Accept-Language header?
#62In 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…
Re: Who uses Accept-Language header?
#63Question: Can you include two languages with the same level of preference in the Accept-Language header? The idea is that the website chooses which language (between those two) to use.
Re: Who uses Accept-Language header?
#64Question: Can you include two languages with the same level of preference in the Accept-Language header? The idea is that the website chooses which language (between those two) to use.
Re: Who uses Accept-Language header?
#65Earlier quoted context omitted.
At work we have it implemented as follows: 1. Check if there is a language cookie set previously 2. If no cookie, check if the Accept-Language is present and contains one of the supported locales 3. If no Accept-Language matches, use the fallback application language Not that hard to implement, except perhaps parsing the Accept-Language preferences with their quality value can be cumbersome.
> Not that hard to implement, except perhaps parsing the Accept-Language preferences with their quality value can be cumbersome. Many web frameworks provide a tool for parsing these for you. If yours doesn't (or you're not using one) you may be able to find a package that does. Some will also do the matching for you, so you can pass it a list of languages you can support alongside the Accept-Language string and it wi…
Re: Who uses Accept-Language header?
#66 https://en-gb.foo.com >> set cookie and redirect to bare domain
...?lang=en-GB >> set cookie and redirect without the lang portion
I'm also a proponent of having a mini-flag for the current language as a dropdown/flyout menu in the upper-right of the header where each local/language has the appropriate flag/representation in addition to the language name IN that language.You can use just language (en) instead of language+locale (en-US) as desired.
edit: also, make sure you set your cache directive to include the cookie/header in question. You can also work the other way and always use the locale for subdomain.
Re: Who uses Accept-Language header?
#67Earlier quoted context omitted.
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, youtu…
I want "proper" English, SI units and Euro as default currency. For me, the only thing that sort of works is pretending to be Irish.
Re: Who uses Accept-Language header?
#68There 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, youtu…
The most egregious instance of this is Google search with the news articles at the top. When I’m in Thailand, even if Google correctly figures out that I want English, it displays the news articles with the year in the Thai calendar! How many English speakers know that the current year in the Thai calendar is B.E. 2567‽ This is the correct configuration for approximately zero people in the world!
Re: Who uses Accept-Language header?
#69Earlier 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…
Re: Who uses Accept-Language header?
#70Earlier 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.
I like when the language is in it's own name, eg: Suomi -- makes it easier to find.