Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Google search - Language from URL

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.

like image 841
Ian H. Avatar asked Dec 08 '22 20:12

Ian H.


2 Answers

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.

like image 163
mrogers Avatar answered Dec 28 '22 05:12

mrogers


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
like image 31
mivk Avatar answered Dec 28 '22 05:12

mivk