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

Return way names in all available languages #4561

Open
yuryleb opened this issue Sep 30, 2017 · 4 comments
Open

Return way names in all available languages #4561

yuryleb opened this issue Sep 30, 2017 · 4 comments

Comments

@yuryleb
Copy link
Contributor

yuryleb commented Sep 30, 2017

There are many countries with several official/unofficial languages and many streets/POI with names assigned for more than one language (name:<lang>). Is it possible to return all them not only the default name by public OSRM interface?

I suppose the StringView type in name-returning methods could be extended for this with a map of string_refs indexed by language code in addition to string_ref field for default name.

This allows OSRM frontends (OSRM Text Instructions as first example) to choose the names with language matched the current user's one and dynamically switch from one language to another also for route ways not for their instructions only.

Also this helps to provide some advanced language-dependent functionality to route directions, say grammatical cases applying to way names.

@1ec5
Copy link
Member

1ec5 commented Oct 3, 2017

Is it possible to return all them not only the default name by public OSRM interface?

Would it be possible for OSRM to accept a preferred language as an option? Including all the languages could bloat the response.

@yuryleb
Copy link
Contributor Author

yuryleb commented Oct 4, 2017

Actually yes, nobody usually asks for route for one language first and for another immediately after 😉

Then it just requires extending OSRM interface in another place - new optional language parameter for route construction and some simple (but unfortunately implicit) logic to choose name:<language> if available (and also to check for more "general" language if "exact" one was not found previously, that's pt for missing pt-BR) or default name only after.

Anyway OSRM needs to grab names from OSM in all available languages for its data files.

@AdiSegev
Copy link

AdiSegev commented Jul 5, 2020

Hi,

I'm using Mapbox on Android, on a Hebrew language device.

I need to use Directions for route navigation, I can see that the announcement/banner instructions returns like this:
בעוד 700 רגל, פנה שמאלה לבן גוריון; Ben Gurion.
It means that the street name comes with both english and hebrew, separated by semicolon.
Mapbox tram told me that's because of the way OSM returns the street names.

Is there any solution for that?

@murr999888
Copy link

murr999888 commented Mar 10, 2021

In Mapbox Navigation, there really is a problem with playing voice instructions. The main language of the map is not supported by Amazon Polly, but the streets have additional names in the supported language. And they cannot be obtained either in OSRM or in Mapbox Directions. As a result, the instruction either consists of words of two languages ​​and some of the words are not pronounced. Or the instruction is all in one language, but Amazon Polly does not support this language and therefore this instruction is not pronounced at all.

Mapbox Direction often returns a double street name - both in the local language and in English. And that only makes the problem worse as Polly tries to speak all these words.

It would be very useful to have an option for the preferred language of street names: if there is such a name - return it, if not - return the street name in the main language of the map.

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

4 participants