This does not happen with any other chromium based browser
My phone locale is set to Italian with English as second language. IP address is Italian. I’m not understanding why sites like f-droid, Google dev documentation, gitlab, are all defaulting to Chinese as I can’t read it…
Sometimes I can find a link to switch back to either English or Italian, but the next visit they revert to Chinese…
If you visit a website which shows your HTTP headers, like ifconfig.me, what does it say for the “Language” header?
Cool site!
Now I know what’s going on. I added Chinese as a third language because of a bug of an app that defaults to gibberish if it’s not specified.
Firefox is sending
it-IT,en-US;q=0.8,zh-Hans-CN;q=0.5,zh-CN;q=0.3
While chromium sends
it-IT,it;q=0.9,en-US;q=0.8,en;q=0.7,zh-CN;q=0.6,zh;q=0.5
I checked some implementations of the check and some of them are bugged and assume that the language tag has only one hyphen. So they read
zh-Hans-CN;q=0.5
and instead of understanding it as “priority 0.5 for zh-Hans-CN”, they understand it as “maximum priority for zh-Hans and priority 0.5 for CN”Screenshot of wrong parsing for the string sent by Firefox (the chromium one is parsed correctly)
Now what to do… It’s impossible to contact Google to fix their implementation of language detection…
It’s impossible to contact Google to fix their implementation of language detection…
What do you mean by this? If the site parses the header incorrectly and displays a wrong language, then it’s a bug of the website, not the browser. You also said that chromium sends headers that are parsed correctly.
I mean that Google needs to fix their android dev documentation site to parse the header correctly, and I feel very unlikely that they’re going to fix if their own browser doesn’t send an header like that and doesn’t have the problem
Can you remove zh-Hans-cn from Firefox and just keep zh-cn?
Zh-Hans is redundant here - it is for simplified Chinese, while zh-Hant would be used for traditional chinese. But both are not well implemented and usually people only use the country codes. Zh-cn is already simplified Chinese. Zh-TW (for Taiwan) is often used to cover traditional chinese.
It’d be interesting to see if you get the same bug if zh-hans-cn is added to chrome, as it seems its the actual language tag that is causing the issue and possibly not related to the specific browser at all.
Now what to do… It’s impossible to contact Google to fix their implementation of language detection…
Your browser just sends the headers and doesn’t do any detection by itself, besides having a list of ‘locale to locale strings’. It’s possible that the 2 hyphens go against the official local spec. But from what I remember it does seem to be the correct locale string. So the problem would be in the implementation of the websites that display it wrong.
没什么啦, 艾逼
壞蛋
Have you checked the language settings of Firefox itself? (Assuming it just happens when using Firefox and not the native Browser)
on mobile the only setting available it’s for the UI language and there’s not the extensive language panel setting that is available on desktop. about:config is also missing
I think about:config is enabled on Nightly (possibly Beta as well?), and also the Fennec F-Droid build.
Then perhaps the “Translations” are set to automatic?