Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use Accept-Language to determine the language parameter to pass to search engines #5

Open
lazd opened this issue Oct 25, 2013 · 2 comments

Comments

@lazd
Copy link
Owner

lazd commented Oct 25, 2013

The Accept-Language header should be used to determine the language to restrict search results to.

See Accept-Language RFC and Google's language collection values.

DuckDuckGo seems to support the kl and kad parameters that serve a similar function. These should be investigated as well.

@simevidas
Copy link

Yes, great idea. Reading the Accept-Language header and writing a corresponding lr value for Google is doable. Btw, I've checked in my browser (English version of Firefox) for a couple of sites, and the Accept-Language value that the browser is sending is "en-US;en;q=0.5".

@Alhadis
Copy link

Alhadis commented Aug 30, 2022

I second this. Currently, [mdn.io/Error.prototype.stack](https://mdn.io/Error.prototype.stack) points to the German version of the page, despite my browser sending Accept-Language: en-AU,en-GB;q=0.7,en;q=0.3 as an HTTP header. I also confirmed that DuckDuckGo's "Language" setting was set to "Browser preferred default" in the Settings page).

Also, all variations of English can safely be mapped to en-US, since that's the only regional variant of English that MDN supports. 🙄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants