Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request : latinization of names #697

Open
simfr24 opened this issue Oct 10, 2022 · 3 comments
Open

Feature request : latinization of names #697

simfr24 opened this issue Oct 10, 2022 · 3 comments

Comments

@simfr24
Copy link

simfr24 commented Oct 10, 2022

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.

@lostfocus
Copy link

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

@simfr24
Copy link
Author

simfr24 commented Nov 6, 2022

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

@otbutz
Copy link
Contributor

otbutz commented Nov 7, 2022

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);
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants