Maxime W.
Maxime W.

Reputation: 31

How to force Google Autocomplete to result in "native language"?

Good evening together, I am using the Google Maps API for JavaScript coding. In fact, it's bascically this function: https://developers.google.com/maps/documentation/javascript/examples/places-autocomplete-addressform?hl=de

Now the question is: if I load the Google Maps in "French" for a French user, it will give me "Cologne" as result for "Köln". How can I force Google to give me the "native" name of each city as result, so Köln for Cologne, Beijing instead of Peking, Pekin, etc.?

Upvotes: 3

Views: 710

Answers (1)

Nate Beers
Nate Beers

Reputation: 1425

Did you try using the language parameter in your script?

<script src="http://maps.googleapis.com/maps/api/js?libraries=places&sensor=false&language=yourLanguage"></script>

You can see a list of languages here: https://developers.google.com/maps/faq#languagesupport

Upvotes: 1

Related Questions