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.
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.
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
Related
I am developing a search engine extension for Firefox and I want to set it as (default) search engine using JavaScript. That means, if
somebody wants s/he should be able to type some query into the search field or the address field and the search should be redirected to the
extension. This is pretty easy to do when the target URL is a real address like http://mysearch.com (see this SO question and the relevant Mozilla Developer documentation), but it does not work if you try it with an extension URL
like resource://my-search-extension/search.html. Is there some way to still achieve this, e.g. by some hook listening on query inputs in
the search or address field?
P.D. You can set up a bookmark shortcut so that you can redirect a search like s keyword to an extension, but this not a convenient option
in my case.
I want that Google uses only English as interface language, despite the IP I am currently using is from a non English speaking country.
I can do so manually with the settings in the Google language settings, but I couldn't identify a GET parameter that is responsible for the Google Language interface settings.
I want to make raw Get requests with a networking library. So I cannot set the settings in the google user interface.
The search reference wasn't particularly useful: http://www.google.com/support/enterprise/static/gsa/docs/admin/72/gsa_doc_set/xml_reference/request_format.html
Thanks for any hints!
Found it:
Optional. The hl parameter specifies the interface language (host language) of your user interface. To improve the performance and the quality of your search results, you are strongly encouraged to set this parameter explicitly.
from https://developers.google.com/custom-search/docs/xml_results#hl
I have multilanguage website. Actually, the website language is chosen according to the web browser language.
Is there any way to set the language according to the search engine spider? For example:
Display the website in Chinese for Baidu search engine spider,
Display the website in Russian for Yandex spider?
This is called crawler identification. When a request is made to your website, User-Agent field contains the information about the browser or the crawler.
Depending on the crawler, the value of this field will be different. You can then associate different values with different languages. You can also take a look at the large list of user agents.
I'm still pretty sure that by doing this, you'll lower your rank in search engines since you provide different responses to crawlers than to real users, but I don't have solid references to support this statement.
In all cases, crawlers are expected to gather resources in different languages, and those crawlers know how to deal with multilingual websites, except maybe the ones which try to follow every worst practice. Also, the search engines you quoted are not limited to one language. Yandex is available for example in Turkish. As for Baidu, According to Wikipedia, it serves China, Japan, Thailand, Egypt and India.
I'm currently writing an ASP.NET MVC 3 web application that supports multiple languages.
I already managed to translate all the routes so that calls like:
www.mysite.de/Kontakt and www.mysite.de/Contact will route to the same Controller/Action.
By design it is so that when calling www.mysite.de the language (stored in the session object) will automatically be set to a default language (here German). The navigation of the site is then dynamically setup accordingly.
The language in the session object can be changed by either hitting the "English version" link or when manually calling e.g. www.mysite.de/Contact. In this case it is recognized that the link (/Contact) matches a route that is
defined as English and so I change the language in the session object to English. Of course the content of the sites is also localized.
My question now is how does that cooperate with SEO, especially with Google?
I already add the Content-Language meta tag dynamically to each page. So I think that with a proper sitemap.xml should be sufficient.
Does Google recognize this correctly? Is it when searching Google in German that I get "Kontakt" as result and "Contact" when searching in English?
Another issue is what happens when the link is the same for different languages? E.g. the link to "Jobs" would/could be the same as well in English as in German.
I hope that the question is understandable as my issue is rather complicated.
Cheers,
Simon
Google does not only rely on you telling them what language your site is in, you only hint them.
The pages will be analyzed and presented as a page in "German" or a page in "English" based on the language of the content.
But your base assumption is correct.
Yes, if I search for your page in German, and Google has indexed the page as a page in German, Google will return Kontakt.
As for your second question, unless you provide another mean to change the language other than the path (query string or language in browser setting), those links will only be in your default (German) language.
If you would like them to appear in english, use a different, additional URL: Jobs-EN that you only have in your SiteMap.xml (and route, of course).
Another issue is what happens when the link is the same for
different languages? E.g. the link to "Jobs" would/could be
the same as well in English as in German.
You might consider having the language as part of your URL, for example:
www.mysite.de/de/Kontakt
www.mysite.de/en-us/Contact
www.mysite.de/en-gb/Contact
What is the best way to determine the language of twitter posts.
There is the language parameter that comes with the streaming API but it doesn't really seem to be very accurate. Even many Japanese posts are labelled as English.
What have others done to sort out the langauges?
I've had very good results with this PHP package:
http://pear.php.net/package/Text_LanguageDetect/
It is fast and open source. We use it to select English only posts for a site we run at http://2012twit.com.
google have language detection within their Translate API if using evil external services is a go-er?
http://code.google.com/apis/language/translate/v1/reference.html#detectResult