0

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?

user31929
  • 1,115
  • 20
  • 43
  • There is some information ont his thread http://stackoverflow.com/questions/6464788/google-maps-api-v3-5-geocoder-language-option – N0mi Mar 30 '15 at 11:03
  • thank you but the thread don't show how to pass multiple language in the language option – user31929 Mar 30 '15 at 12:37

1 Answers1

1

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

N0mi
  • 714
  • 7
  • 14
  • yes it is also my conclusion after some other googling... so i'll mark your answer as correct, until and if someone will find another solution – user31929 Mar 31 '15 at 13:35