Reputation: 1145
In my ios app i'm using this call to get an autocomplete function
https://maps.googleapis.com/maps/api/place/autocomplete/json?input=%@&types=(cities)&key=%s
After that i use another call to retrive details of a place starting by his placeid:
https://maps.googleapis.com/maps/api/place/details/json?placeid=%@&key=%s&language=en&oe=utf8
Now i need to store in my app the city name in localized format (english,italian,french,spanish). I think that i can made a localized place-detail each language i wanna support but i would like to retrive this information with the minimum number of requests. There's a way to get all the localized name of a city starting by his placeid?
Upvotes: 0
Views: 396
Reputation: 814
I might be wrong on this, but it seems like you can only set one lanugage in the language parameter. Yet, even with that you should be able to make multiple calls like
var langIDs = ["en","it","fr","de","es"];
for(var langID in langIDs){
url = "http://maps.googleapis.com/maps/api/directions/json?origin=34.431741,135.392299&destination=34.631741,135.992299&sensor=false&language=" + langIDs[langID]+ "&";
}
Note, I did not test the code.
Thank
Upvotes: 1