D
D
Dmitry Amelchenko2019-03-06 10:35:13
Ruby on Rails
Dmitry Amelchenko, 2019-03-06 10:35:13

The geocoder gem partially returns the result in English. Possible to fix?

Geocoder.search("Москва", params: {language: :ru}).first

"address"=>{"city"=>"Moscow", "state_district"=>"Central Administrative Okrug", "state"=>"<b>Moscow</b>", "country"=>"Russia", "country_code"=>"ru"}

API OpenStreetMap Nominatim

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
Dmitry Amelchenko, 2019-03-21
@i1677960

Works if changed

Geocoder.search("Москва", params: { language: :ru }).first
on the
Geocoder.search("Москва", params: { 'accept-language': :ru }).first
✌️

V
Vayladion Gognazdiak, 2019-03-06
@etspring

Alas, not if you use Google. Huyandex works better with the Russian language.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question