Suhanya Murugan
Suhanya Murugan

Reputation: 1

City name, County name returning in other languages not in English

When i search using below FQ API :

https://api.foursquare.com/v2/venues/search?ll=19.346523,-99.191292&query=gimn&oauth_token=Z1NASAZ5IEUSDJAJG1VMQO5YX410DJXUKBKAHXN0FYIB15BQ&v=20150401

In browser we got the City name as "Mexico City".

But, when i used this API call in file_get_contents or curl, city name is returning as "Ciudad de México" in spanish language. I need City name in English, Pls provide me the steps to fix this issue.

Thanks,

Suhanya.M

Upvotes: 0

Views: 214

Answers (1)

Rakesh Guha
Rakesh Guha

Reputation: 366

It's defaulting to Spanish, as it's the most popular for that locale. You can specify locale=en for English:

https://developer.foursquare.com/overview/versioning

Here's what the new link would look like; note the additional parameter at the very end:

https://api.foursquare.com/v2/venues/search?ll=19.346523,-99.191292&query=gimn&oauth_token=Z1NASAZ5IEUSDJAJG1VMQO5YX410DJXUKBKAHXN0FYIB15BQ&v=20150401&locale=en

Upvotes: 2

Related Questions