electronjs.org-old icon indicating copy to clipboard operation
electronjs.org-old copied to clipboard

Language detection is wrong

Open tbarbugli opened this issue 7 years ago • 2 comments

When using Chrome (both regular and incognito mode) I get PT-BR as default language. My browser is set to english, I don't speak the language and I am browsing from US :)

Interesting fact: if I use Safari I get English as default language.

tbarbugli avatar Apr 20 '18 19:04 tbarbugli

Looks like the bug is related to how the Accept-Language is used.

For example in this case:

Accept-Language: en,it;q=0.9,it-IT;q=0.8,it-CH;q=0.7

The content returned is in italian which is exactly the opposite of what the header is telling.

Google Chrome allows you to specify this via Settings -> Advanced -> Languages

tbarbugli avatar Apr 20 '18 19:04 tbarbugli

Curious. Are you still seeing this behavior, @tbarbugli ?

If so, it will probably need to be resolved in the express-request-language modul, or the accept-language module that it depends on.

// @tinganho

zeke avatar May 23 '18 19:05 zeke