logoalt Hacker News

Waterluvianlast Thursday at 2:24 PM2 repliesview on HN

Does "advertises" in this context mean what's put in the "Accept-Language" HTTP header? Might be worth seeing what that value specifically is the next time this happens. A "clever" IP-based language choice server-side seems far too complicated and error prone, but I guess that's what makes it so "clever."


Replies

drchickensaladlast Thursday at 3:36 PM

Yeah I've seen this a few times on the backend that decides this. The standard should be to use the accept-language header, but all the time when people write their own code on top of frameworks (or maybe use niche shitty ones) they just geoip for language.

For business use cases sometimes it's based on the company's default language that you're an employee for.

rypskarlast Thursday at 3:45 PM

Try to use any Google site while traveling. I have two languages in my Accept-Language header, but Google always give me language based on location if I'm not logged in. There are also many other sites that does the same, often without any option to change language