News for hackers. Stuff that matters.
Re:Flags Are Not Languages by ryandrake on Sunday May 05, 2024 @11:03AM (#40265406)
At least on the web, you shouldn't even be using your web UI to change the language in the first place!

Browsers already send Accept-Language: headers. Just use that. Why complicate your UI? It's at best redundant and at worst annoying when a web site chooses to ignore my preference and rolls its own.

Re:Flags Are Not Languages by wongarsu on Sunday May 05, 2024 @11:24AM (#40265546)
I often want to change the language depending on the context of the website. Often you see machine translated text (in either direction) that's much less useful than the original. Also while I'm more familiar with many terms in my mother tongue, and some don't even have clear mappings to English, on many technical topics I'm much more familiar with the English terms.

By all means default to the Accept-Language header, but let me change it (and remember that choice)

Re:Flags Are Not Languages by randomdata on Sunday May 05, 2024 @12:17PM (#40265987)
You can change it by sending a different Accept-Language. It is per request, so you can send different ones to different hosts.
Re:Flags Are Not Languages by tpmoney on Sunday May 05, 2024 @11:23AM (#40265539)
On the other hand, where is the UI in the browser to specify your language preference for each individual site? A person might have a general language preference, but might prefer to read particular sites in an alternate language, e.g. for practice learning a language. Firefox offers the option to specify an order of preferred languages globally, but as near as I can find, no way to specify on a per-site basis.
Re:Flags Are Not Languages by ryandrake on Sunday May 05, 2024 @11:44AM (#40265681)
Interesting! I never considered the case you and the other replier brought up where people might want to browse different sites in different languages. Learned something new today, thank you!

I suppose browsers could/should add support for this use case, none of the major ones do as far as I know.

At the very least, I maintain that sites should use Accept-Language: as a default, absent any site-specific configuration that they offer. One of the huge things I hate about Google and a few other sites is that they deliberately ignore my Accept-Language: header and instead rely on IP-Geolocation. So if I'm traveling in another country, suddenly Google and those other sites change to a different language on me. Maddening.

Re:Flags Are Not Languages by debugnik on Sunday May 05, 2024 @11:43AM (#40265673)
First, because I want to switch away from badly translated content (or worse, badly machine translated content, cough cough Microsoft), even if I generally prefer it in my native tongue. I agree this should be a more accessible feature at the browser itself, maybe an extension.

And second, because many corporations conflate language with region, so they redirect me to the wrong country-specific site, or at least one useless to me compared to the global (which usually means US) one.

Re:Flags Are Not Languages by bjackman on Sunday May 05, 2024 @11:17AM (#40265498)
I browse the web in multiple languages. I don't even know how to change my Accept-Language headers. I prefer to be able to just choose the language while I'm browsing. That also lets me easily see what languages the site actually offers.
Re:Flags Are Not Languages by masklinn on Sunday May 05, 2024 @11:43AM (#40265677)
I also browse the web in multiple languages. Accept-Language follows the language selection of the browser or OS (sadly Apple is kinda stupid so they only use the first language configured in system preferences, if you configure multiple languages in Firefox's preferences it actually follows that).

I absolutely love when websites randomly pick a language I can't read, which is not anywhere in my accept-languages (which does contain languages they do support), with a language selector hidden somewhere unspecified on the page. It's even better when I need to go through a cookie popup I can't bypass in that language I can't read without a language selector before I can do anything else.

That second paragraph is sarcastic, just in case.

Re:Flags Are Not Languages by marcosdumay on Sunday May 05, 2024 @12:03PM (#40265847)
> It's even better when I need to go through a cookie popup I can't bypass in that language I can't read without a language selector before I can do anything else.

But if you could read, you wouldn't consent to it...

Re:Flags Are Not Languages by masklinn on Sunday May 05, 2024 @12:08PM (#40265885)
I mean I often can't really consent to it either, because I don't even know what button would be "Yes sure I'll sell my soul to you for no consideration that sounds great".
Re:Flags Are Not Languages by derefr on Sunday May 05, 2024 @11:47AM (#40265717)
This would be fine if all computers were guaranteed to be personal computers that know their current user's preferences.

But they're not. Library computers exist. Shared office computers exist. Internet cafes exist. Let's call these "kiosk computers."

The optimal way to balance access needs here, IMHO, would be for either Operating Systems on kiosk computers, or maybe specifically browsers on kiosk computers, to offer a very quick, session-ephemeral toggle for what language the current user wants to see UI and content in.

(Probably, given that kiosk computers are almost always left on default settings of the OS, while personal computers are, well, personalized, such a toggle should be on by default, with users of personal computers expected to disable it.)

But until such a time as that ever happens, I would expect that websites will continue to simulate this thing the OS isn't offering.

Re:Flags Are Not Languages by jjp on Sunday May 05, 2024 @12:04PM (#40265856)
It's also terribly annoying when I've found a page through a search engine and the site decides that I don't want that language. Navigates me to the language of my accept-language, decides that's on a different domain which is managed by a different team/CMS and doesn't have or can't find the page I was looking for in the first place.
Re:Flags Are Not Languages by pjmlp on Sunday May 05, 2024 @01:18PM (#40266477)
Well, given how bad some technical translations happen to be, I want to see regular Web content in one of my native languages, but read programming stuff in English, so Accept-Language: headers alone won't do it anyway.