Reputation: 19618
In my app I'm using google.maps.places.Autocomplete.getPlace()
in order to get info such the name of a city, the problem is that the informations retrieved are localized according to the "language
" parameter passed via querystring when importing the library, instead I would like to have them always in english, while preserving localization in the autocomplete and the rendered map (that is, if the user is italian he will see for example "Venezia" in the UI, but in my client-side api I will get "Venice")... how can I do?
Upvotes: 7
Views: 2318
Reputation: 1641
Okay, I found it here: https://developers.google.com/maps/documentation/javascript/basics#Localization
So basically you need to provide language
parameter when loading Google API:
<script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?language=en">
Upvotes: 4