photon icon indicating copy to clipboard operation
photon copied to clipboard

Feature request : latinization of names

Open simfr24 opened this issue 2 years ago • 3 comments

Would it be possible to return, regardless of the chosen language, the local and latinization of the city name ?

Ex : If I'm searching for with the english tag, I get "Al Ghubaiba", but if I look with the french tag, I get the local version "الغبيبة" which is a bit inconsistent.

Ideally, I would love to have the ability to select several languages in order, so for example : if selecting &lang=fr,en, I would get the french name if available, if not, the english one, and only if none of these are available, the local one.

simfr24 avatar Oct 10 '22 06:10 simfr24

I guess that's because the OSM node doesn't have a french name attached: https://www.openstreetmap.org/node/6584833629#map=19/25.26504/55.28861

lostfocus avatar Nov 06 '22 17:11 lostfocus

@lostfocus I perfectly understand that, but would it be possible to have a "if no fr revert to en" ?

simfr24 avatar Nov 06 '22 18:11 simfr24

We could transform based on the script of the requested language using icu4j if we don't have a matching tag.

if ("Latn".equals(locale.getScript())) {
    return Transliterator.getInstance("Any-Latin").transform(name);
}

otbutz avatar Nov 07 '22 07:11 otbutz