Google search - Language from URL
Asked Answered
B

2

8

Is it possible to choose in which language Google Search is going to present results? I would like to let users in my application search the web, but with a slightly adjusted browser, how could I specify the language that Google Search uses there?

The standard URL is www.google.com, but this always searches English for me.

Brooklet answered 28/12, 2016 at 19:42 Comment(1)
L
19

You should be able to use hl={lang} as part of the query string. For example https://www.google.com/search?hl=de&q=waffles searches for 'waffles' in the German language (Deutsch = de).

I found this by performing a Google search, clicking "Settings -> Languages", changing to a different language and noting the abbreviation used in the hl={lang} portion of the query string.

You should be able to use this method to determine other language identifiers for the hl={lang} section.

Leak answered 28/12, 2016 at 20:59 Comment(1)
Very useful for a Tor user like me, as Google's subdomains (e.g. trends) set language based on IP-based geolocation & there seems no easy way to stop itKuykendall
I
6

To set the Google interface language, use &hl=XX.

To set the preferred language of the search results, use &lr=lang_XX.

For example, to have the Google interface in Italian, but have search results offer mostly German pages, use

&hl=it&lr=lang_de
Icsh answered 12/8, 2022 at 16:2 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.