Ik spreek geen Nederlands

In this episode of the daily report about war crimes commited during web development we are going to take a slightly longer journey. Our task is straightforward: we are going to travel all around the world visiting a randomly* chosen website. Normally this would be time consuming and expensive, but thanks to the advanced breakthrough technology called "Virtual Private Network" that I managed to acquire, we can do it without leaving our living room sofas.

During our journey we will be using google.com as an example of a commonly visited website. As a matter of simplification we will visit only two countries. Below you can see the appearance of the said website's front page as accessed from Belgium and Portugal, respectively. I have not changed anything about my computing environment apart from moving it around Europe.

As you can see, the text was (for reasons unknown to me) helpfully translated into the language of the country we happen to be in. Unfortunately I don't speak either Dutch or Portuguese so I can only interpret this behaviour as a punishment encountered by people rude enough to dare travel abroad without learning the language spoken in the country they happen to be in, thereby breaking the worldview held by the particular programmer who happened to be responsible for creating the translation module for this amazing example of good web development practices.

During this entire adventure my browser was happily sending the same information it always sends, dutifully informing interested web developers about my preferred language in which I like to consume popup windows, be tracked and have my privacy violated:

Accept-Language: en-US,en;q=0.5

It even seems like matching against a simple map of languages would be easier than using a library mapping IP addresses to countries**. And don't tell the author of this solution that some countries use multiple languages!

Unfortunately the problem I am describing is quite complex. The Accept-Language header doesn't let the users express some complex requirements, such as a preference towards a language only if it is used in the country of origin of a website. A possible good compromise could be a preference towards the languages of the country the person is in, but only if they are present in the list of languages provided by the Accept-Language header. This could help avoid serving inferior translations of a website to visitors but would not help VPN users. Moreover, it was confirmed that many users have their Accept-Language headers misconfigured. In my view, this is a failing of web browsers and their user interface; this could be solved by using a simple prompt asking the user if they want to change the preferred language based on their IP address. All things considered for now I believe that the Accept-Language header is the best mechanism we have for solving those problems.

As it stands, the problem I described is quite widespread and encountered daily by anyone traveling abroad, or using a VPN as a measure aimed at saving their privacy. Ironically, I personally encountered it for the first time due to some media being unavailable in Germany which led to the network I was using being VPN'ed at the router level with the egress point located in the Netherlands - hence the title of this post. But that is an angry post for another time.

Please use Accept-Language, it is there for a reason.

* For some unspecified amount of "randomly".
** In reality it is highly likely that Google uses a more advanced and equally useless automated probabilistic solution to this problem. Some people would call this "Artificial Intelligence" but there was nothing intelligent about serving me those languages.
2019-09-21