0

I am using VK API to get list of cities in specific country. Does anyone know how to show Russian cities (which are in Cyrilic) in Latin? Example of JSON response:

http://api.vk.com/method/places.getCities?lang=en&country_id=1&count=1000&need_all=1

I am trying to check if city exists, but if someone enter city name in latin, in some cases city check works, for example Vladivostok is Владивосток, but Moscow is Москва.

minton
  • 37
  • 2
  • 8

2 Answers2

0

I found one solution that works for me: firstly get all cities ids by places.getCities (database.getCities) method and then use database.getCitiesById providing saved cities ids like following:

database.getCitiesById?lang=en&city_ids=1,2,123

In request to this API method you can specify needed language by parameter "lang" (e.g. lang=en) and up to 1k comma-separated cities ids (e.g. city_ids=1,2,123,...).

database.getCitiesById official documentation

Undo
  • 25,519
  • 37
  • 106
  • 129
0

As an alternative, you can get the static list of Russian cities here. This JSON array contains the slug name of each city in English. It's a free list, so anyone can edit and add correct information for any localities.

Stepanov Max
  • 159
  • 3
  • 4