NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum

My reverse geocode result contains some of sinhalese language. I want to get rid of that and want completely English result to be dispalyed. how should that be done?

asked 10 Jun '19, 10:58

charuUmesh's gravatar image

charuUmesh
11112
accept rate: 0%

edited 10 Jun '19, 10:59


Add &accept-language=en to the API request URL.

By default Nominatim returns the value of the name tag, e.g. for https://www.openstreetmap.org/relation/5337946 that is මාතර දිස්ත්‍රික්කය. If you set &accept-language=en then Nominatim first looks at the name:en tag.

https://nominatim.openstreetmap.org/reverse.php?format=json&lat=5.973857676873632&lon=80.54088463153965

"address": { "suburb": "Welegoda", "state_district": "මාතර දිස්ත්‍රික්කය", "state": "දකුණු පළාත", "postcode": "81050", "country": "ශ්‍රී ලංකාව இலங்கை", "country_code": "lk" },

https://nominatim.openstreetmap.org/reverse.php?format=json&lat=5.973857676873632&lon=80.54088463153965&accept-language=en

"address": { "suburb": "Welegoda", "state_district": "Matara District", "state": "Southern Province", "postcode": "81050", "country": "Sri Lanka", "country_code": "lk" },

permanent link

answered 10 Jun '19, 11:58

mtmail's gravatar image

mtmail
4.8k1574
accept rate: 27%

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×85
×3

question asked: 10 Jun '19, 10:58

question was seen: 4,466 times

last updated: 10 Jun '19, 11:58

NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum