How do I tell google map's geocoder API to use english not the browser's default languange?
For example, User's OS language is French and when he use the website and querying for london, it returns angleterre, londres
is there a way to force the geocoding to return EN_GB locale? So it returns: United kingdom, london.
And also if the user is Chinese, it'll return everything in chinese. How can I avoid this?
Please help!
Thanks,
Google Geocode API
You can set the language parameter
language (optional) — The language in which to return results. See the supported list of domain languages. Note that we often update supported languages so this list may not be exhaustive. If language is not supplied, the geocoder will attempt to use the native language of the domain from which the request is sent wherever possible.
The map controls, tooltips, and copyrights have been translated for a subset of languages, listed in the spreadsheet below. The API will sense the browser settings of the user and set the language appropriately. It is possible to override the language in the APIs; more information is available in the JavaScript API documentation and the Flash API reference.
For Example:
http://maps.googleapis.com/maps/api/geocode/json?address=japan&sensor=false&language=en
returns in English
http://maps.googleapis.com/maps/api/geocode/json?address=japan&sensor=false&language=zh-CN
returns in Chinese
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With