Hacker News new | ask | show | jobs
by Freak_NL 487 days ago
> I will add, please make sure that language is an independent setting, and not derived from locale!

Websites already have exactly what they need to provide you with the language you want via the Accept-Language header your browser sends. In your browser's settings you can configure a list of languages (country-specific if desired) which get send with every request.

E.g.,:

    en-GB
    en
    nl
(Prefer British English, fall back to any English, and if not available either use Dutch.)

This is already entirely separate from your OS locale! Although it will default to filling it in with that locale's language if you don't configure it yourself of course.

This should be the primary way to decide upon a language, but in addition to that offering a way to switch languages for a specific site on that site itself is a user-friendly gesture appreciated by many.

6 comments

This is not true. E.g., Safari is tied to the OS settings, Firefox has some dependencies regarding the locale of the first install, etc…

Moreover, probably most people speak or can read more than a single language. There may be reasons for accessing a site in a particular language other than the standard locale.

Please empower users to make their own choice! Do not assume to know better.

For example, when the translation is shit and you prefer to use the English one because the one in your language is impossible to understand.
This does not help in many many situations.

I am a Hongkonger, natively speaks Cantonese, fluent in English and learning Japanese.

If I go to Google I want English UI and prioritise traditional Chinese result then English then simplified Chinese.

On the other hand if I go to a Japanese website, I don’t want them to translate for me, just display the original Japanese will be fine. Unless I toggle.

These kind of complex setup can never be achieved if we don’t have a per site locale policy. And seriously. A toggle per site is easier than navigate three level deep into browser setting page.

> A toggle per site is easier than navigate three level deep into browser setting page.

I don't disagree with your overall point, that flexibility is useful for website visitors, but your statements requires asking the question: "easier for whom?"

Certainly relying on Accept-Language is significantly easier for the website maintainer. And overall it would be a lot easier if the small handful of web browser maintainers added saner settings (even a per-website Accept-Language toggle), than if we were to require the thousands (tens of thousands? millions?) of multi-language website developers to provide their own toggle. Not to mention having a standardized way to do manage this would be better for users than having to discover each website's language toggle UI.

But sure, we don't have those easy-to-use browser settings, so it's (unfortunately) up to every website developer to solve this problem, over and over and over.

(As an aside, it would be cool if websites could return a hypothetically-standardized Available-Languages header in their responses so browsers could display the appropriate per-website UI, with only the supported languages.)

The problem is when you understand multiple languages.

If a website is made by an English speaking team, as I understand English I'd like it to be English first and not a possibly broken French version. If a website is developed with French language first I'd like to have it in French and not a second-rate English translation.

> In your browser's settings you can configure a list of languages (country-specific if desired) which get send with every request.

Customising this list at all makes your browser fingerprint thousands of times less common than it was before you did this, and many websites you visit could then probably uniquely identify you as the same user across all of your sessions.

That and a thousand other things. A highly privacy focussed browser could offer to enable this setting only on whitelisted websites (and send 'en' plus a bunch of random language codes on others).
> 'en' plus a bunch of random language codes

This is an easier fingerprint signal than just not sending anything.

Not if the random part of the list changes with each request.

There are two ways to defeat fingerprinting: 1) make everyone look exactly the same (pretty difficult to do), or 2) introduce enough noise and randomness to fingerprinting signals to each request so that each person looks like many different people (much easier to do).

> This should be the primary way to decide upon a language

Google developers are very intelligent, but not intelligent enough to understand this.

They probably understand it just fine. Someone higher-up has just over-ruled them. There may even be a good reason for it, but because of the way companies work, we will probably never find out what it is.
Almost no website uses this, even big ones like Google who insist on showing me pages in German rather than English or French.
On the other hand, sometime the ads that are shown are in German. Easier to mentally filter out.