Blob


1 The HTTP protocol provides a definition for various headers. Among
2 the various header defined, there is one that interest this rant
3 today: `Accept-Language`.
5 In layman's terms, the `Accept-Language` is used to tell the server
6 what language(s) the user understands. For instance, when I visit a
7 website, firefox sends something like this:
9 ```http
10 Accept-Language: en-US,en;q=0.5
11 ```
13 This means that I want English pages. Now, as always, in reality the
14 server can do what it wants, and that's right. As an example, when
15 you visit Wikipedia you can read an entry in other languages, or maybe
16 you're using a web application that lets you choose the language.
18 There are also moments when you have to ignore this headers. No
19 matter what `Accept-Language` you send when reading this entry, the
20 server will always reply with an English text. This is also fine, as
21 not every content is available in every language.
23 However, if you have content in different languages then ignoring the
24 `Accept-Language` header and use the IP address to determine the
25 language to use is just plain dumb. This is so stupid that I
26 shouldn't even write about it, but one of the biggest sites out there
27 does this, and today was the straw that breaks the camel's back.
29 Even if I'm Italian and live in Italy, I use the `en_US.UTF-8` locale
30 and browse the internet in English. Over 90% of my queries on DDG or
31 google are in English (the percentage is completely arbitrary, but
32 shouldn't be too wrong). I want the majority of websites to use the
33 English language when they serve me pages, and most of them respects
34 this decision. Not google.
36 If I search something on google, I usually do it in a "private"
37 window, so the preferences aren't saved and every single time I have
38 to click to "English" in the homepage. Or skim through a page of
39 results only to realize that I have to click "Change to English".
41 (Regarding the "private" window: I try to avoid google in general, so
42 I came up with this rule to use it only in private window. It's a
43 inconvenience to reduce the number of times I use it. Privacy isn't
44 really a concern here, given my `User-Agent` and a bit of GeoIP
45 machinery it should be über easy to track me online. How many OpenBSD
46 users live in northern Italy? I only know one guy except me)
48 There was a time when if you visited `google.it` it should use the
49 Italian language for the search results, and `google.com` used to
50 deliver English/international-ish results. That was just perfect
51 (still broken, but at least workable). Now google just see an Italian
52 IP and use Italian for the search results.
54 I wonder if I'll go to, say, Japan in vacation and do a search on
55 google, will I see Japanese results?
57 Even if this is just another example of google completely ignoring
58 even the most basic standards just to cook up an half-broken NIH
59 solution, it surprises me every time I think about it. (Talking 'bout
60 NIH, believe me, I have another rant waiting to be written about
61 building a library made by them)
63 Is it really too difficult for google to just parse a goddamn header?
65 ---
67 Addendum: the reason I prefer to browse the web in English is that, at
68 least for what concerns CS and tech in general, there seems to be
69 better results in English pages rather than in Italian pages.