News for hackers. Stuff that matters.
Re:Google Open Source Code Search by duckmysick on Thursday March 12, 2020 @05:46AM (#22555184)
I really hate that some of the elements on the page are translated into a different language, seemingly based on my IP. When did it become acceptable to ignore my browser or my system language settings? The same thing happens on other Google services (like Google Groups), but I noticed this trend on other websites too.
Re:Google Open Source Code Search by scruffyherder on Thursday March 12, 2020 @08:44AM (#22556200)
This annoys me to no end. I live in Hong Kong. I speak English. We have 2 official languages here, one of which is English. I travel frequently to Japan as well, with infrequent trips to either Europe or North America.

My 'preferences' and settings are a total disaster. I end up having to go onto the gray market to buy gift cards and prepaid credit cards as I seemingly never can buy stuff online when I want to, as I'm either in the wrong place, or in the wrong language. But I know I'm still me.

What is with this '100% of people in this location read/speak the same?'

What if I want to learn Russian, but I'm in China? Why cant I just tell my computer to show me Russian, and the browser tells the site give me Russian if you have it?

Why is this so hard?

I really dislike things that try to make it easy for me, as all they do is prevent me from being able to function.

Re:Google Open Source Code Search by rkeene2 on Thursday March 12, 2020 @09:35AM (#22556634)
The actual mechanism your User Agent tells the server which languages you are interested in is even more robust [0] ! It is a weighted list of preferences.

The reasons I've heard from web developers on why they don't use this is because they believe that the user probably never set that up right, and that multiple people could be using the web browser so they need to be able to do the right thing.

What I typically do is select the best matching language from the Accept-Language HTTP header, and then override it with a session-specific value IF one is supplied. Example:

1. https://rkeene.org/projects/6to4/

2. https://rkeene.org/projects/6to4/?lang=fr

You can see PART of the problem here from the web developers perspective. This isn't a negotiation so you have no way to know which languages the server supports. If your preferences aren't totally inclusive you'll get something "wrong". This can be solved by exposing that information (as not done above) and allowing the user to override it (as above).

[0] https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Ac...

Re:Google Open Source Code Search by LeifCarrotson on Thursday March 12, 2020 @09:00AM (#22556312)
The problem is that every big website operator wants to make it work correctly for you, and they (1) have different definitions for success and (2) assume you're incompetent.

In the first point, there's someone with a requirements document that assumes every country has one official language and everyone in that country speaks that language, and so feels successful and internationalization-ready when a geo-IP served page is automatically switched to the "correct" language (much like "Falsehoods programmers believe about names").

Second, configuring a computer's locale to set a browser's request headers correctly is beyond the technical expertise of many users. It would be better if things were consistent, but at the point where some locales were set incorrectly and some were uniquely set intentionally your analytics would have showed that you improved the situation on average by trying to guess the locale (screwing over users who knew how to use their computer) than by respecting it and eventually getting everyone to understand how to set their desired language.

Re:Google Open Source Code Search by minusf on Thursday March 12, 2020 @11:37AM (#22557933)
if you install a hungarian firefox, the accept language header will reflect this (or it did when i tried it last time). Non-expert users also often choose software in their language mutation. I dont have numbers but i wouldnt be surprised if a lot of browsers were sending correct accept language headers.

i dont know IE but it was in a very good position to guess the language of the user as well.

Re:Google Open Source Code Search by nske on Thursday March 12, 2020 @09:40AM (#22556684)
Agreed, but then they should give the users a way of overriding that. Google in particular knows what users want because they force you to answer it when you create your account. I've set every single location setting to UK, and yet when I travel abroad they insist of ignoring it. No excuse there.
Re:Google Open Source Code Search by henry_flower on Thursday March 12, 2020 @07:17AM (#22555595)
> based on my IP

heh

in my case I wish it was based on my IP

but for some unbeknownst reason, some components of the page are in Russian. I'm not in Russia; nothing in my browser request indicates I'd like to read Russian.

Re:Google Open Source Code Search by _never_k on Thursday March 12, 2020 @10:18AM (#22557105)
I live in the US and have a local US IP. A year or so ago, I made a site for a side project using vanilla HTML. No frameworks, no JS. Every word on the page was in English and could be found in an English dictionary.

When I first stood the site up and tested it, Chrome would always break in as soon as it loaded, with a popup to translate the site into _English_ from _Romanian_!

I was able to suppress this only by turning on every single language hint in META.

Re:Google Open Source Code Search by dewey on Thursday March 12, 2020 @08:11AM (#22555939)
Maybe your IP is located in russia according to the geo IP database they are using.
Re:Google Open Source Code Search by sischoel on Thursday March 12, 2020 @08:27AM (#22556081)
I live in Switzerland and it is really annoying, as my IP switches between the German and the French part every few weeks.

I also wonder, what is happening in places, where people traditionally where always from different language groups. I don't know if then there is always a single common language.

Re:Google Open Source Code Search by izacus on Thursday March 12, 2020 @10:19AM (#22557110)
Great part of browsing internet from Swtizerland is seeing webpages that are partially German, French and Italian. Even when set to english :D
Re:Google Open Source Code Search by geniium on Thursday March 12, 2020 @09:15AM (#22556433)
same issue for me :(
Re:Google Open Source Code Search by sexy_seedbox on Thursday March 12, 2020 @07:22AM (#22555628)
Add the "hl=en" param to the URL, works for almost all Google services:

https://cs.opensource.google/?hl=en

Re:Google Open Source Code Search by nolok on Thursday March 12, 2020 @06:58AM (#22555501)
Have you tried changing your accept language ? IE, it is not based strictly on your IP, but also on what your browser asks for.

I'm based in France, with a french IP, but my browser language header is set as ACCEPT-LANGUAGE en-US,en;q=0.9,fr-FR;q=0.8,fr;q=0.7

And this page is fully in english.

Re:Google Open Source Code Search by duckmysick on Thursday March 12, 2020 @07:05AM (#22555529)
My headers are set to en-US,en;q=0.9 (no other languages) on both Chrome and Firefox and the page is partially translated on both.
Re:Google Open Source Code Search by minusf on Thursday March 12, 2020 @11:38AM (#22557947)
It's IP only.
Re:Google Open Source Code Search by nolok on Friday March 13, 2020 @07:49AM (#22566515)
No it's definitely a mix, like my exemple in parent comment describe. If I change my accept header to remove EN priority I get the french translation that matches my french IP.
Re:Google Open Source Code Search by Tenoke on Thursday March 12, 2020 @06:17AM (#22555314)
I get this extremely annoying behaviour from many sites (sometimes without even an easy option to switch), including Google Search but not here.
Re:Google Open Source Code Search by duckmysick on Thursday March 12, 2020 @06:54AM (#22555479)
For me, on the main page it's mostly tooltips (More Elements in the navbar, Help in the searchbar) and the blue Show Project link. It's worse on the project pages where the description is in English, but the entire table (including dates) is localized.
Re:Google Open Source Code Search by jsjddbbwj on Thursday March 12, 2020 @07:03AM (#22555518)
Same here. Seems like a bug.
Re:Google Open Source Code Search by neolithic on Thursday March 12, 2020 @06:09AM (#22555274)
I find this extremely frustrating as well, across the various Google services I use.
Re:Google Open Source Code Search by Arnt on Thursday March 12, 2020 @07:31AM (#22555683)
Hasn't that been acceptable since the dawn of the web?

Lots of people log errors to some sort of monitoring system. I can't remember seeing any localisation/translation API that would log an error rather than just silently serve English. I infer from this that just serving English is universally accepted and considering it an error is so rare that I've yet to see an API that caters to it.

Re:Google Open Source Code Search by Arnt on Thursday March 12, 2020 @08:49AM (#22556229)
I see someone downvoted and today'a s frustrating day, so let me ask for more.

English is basically the world's default language (like it or not). Sites that translate partially, but sometimes show English text instead of the language specified by the browser expect the user to understand the world's default.

A language inferred from geoip is the user's area's default language. Sites that show that language instead of that specified by the browser expect the user to understand the area's default.

These two behaviours seem really quite similar to me. Their technical backgrounds differ, but the resulting behaviour is much the same. One has been widely accepted since the dawn of the web, AFAICT, which leads me to believe that the other has been just as acceptable for just as long. And thus, my answer to "when did it become acceptable" is "it always was, you just didn't notice".

Re:Google Open Source Code Search by Thaxll on Thursday March 12, 2020 @09:27AM (#22556552)
it's probably not your IP but your browser settings that are taken from the OS.
Re:Google Open Source Code Search by dntbnmpls on Thursday March 12, 2020 @07:02AM (#22555515)
It's part of the "localization" push by governments, news/media, some consumers and tech companies themselves. I guess it's okay for passive consumers, but for tech or advanced/active consumers, it's annoying. I'm pretty sure most major sites/apps/etc all localize. So your google search results, youtube frontpage, etc will be different based on your location.
Re:Google Open Source Code Search by yorwba on Thursday March 12, 2020 @07:52AM (#22555811)
Localization is not a problem; not giving users control over their locale is. If you travel to a foreign country and suddenly can't read anything on the websites you regularly visit, that's pretty bad. If multiple languages are spoken in your country and you're forced to use one you don't speak, that's bad as well. Websites should never assume they know better which locale their users want than the users themselves.
Re:Google Open Source Code Search by dntbnmpls on Thursday March 12, 2020 @07:30PM (#22563157)
> Localization is not a problem;

I didn't say it was a problem for most users ( aka passive users ). I said it's a problem because they make it difficult/impossible for tech/active/advanced users to switch it.

> Websites should never assume they know better which locale their users want than the users themselves.

Yes. You just restated my comment. Not allowing tech/active/advanced users the option is the problem. I love comments that appear to debunked what instead you wrote but just write it in a different way and pretend it is new.

Re:Google Open Source Code Search by yorwba on Friday March 13, 2020 @05:25AM (#22565876)
Maybe you think that what I wrote was already implicit in your comment, but I'm still not seeing it, and since you got downvoted, evidently a few others felt the same. Next time you'd probably better write it out explicitly.
Re:Google Open Source Code Search by dntbnmpls on Saturday March 14, 2020 @07:52PM (#22579717)
> but I'm still not seeing it

Still?

> and since you got downvoted, evidently a few others felt the same.

This has got to be the saddest thing I've ever seen on a forum.

> Next time you'd probably better write it out explicitly.

Okay I'll give it another shot.

https://news.ycombinator.com/item?id=22563157

Let me know if that cleared things up for you.