nextzen / lrm-mapzen

Support for Mapzen Turn-by-Turn routing in Leaflet Routing Machine
https://mapzen.com/projects/turn-by-turn/
Other
86 stars 31 forks source link

Configure language? #38

Closed rossanag closed 8 years ago

rossanag commented 8 years ago

Hi, I'd like to know if there's the possibilty to change the language. If so, where's the part of the code to tackle? Thanks so much in advance. Best!

kevinkreiser commented 8 years ago

hi there @rossanag, we currently allow you to pass in a language to the api/service via: https://github.com/valhalla/valhalla-docs/blob/master/api-reference.md#directions-options

this seems to be hardcoded to en at present which isnt even a valid language code. it would seem we need to spend a bit of time making this easier for users or lrm to set.

@hanbyul-here @kdiluca what are your thoughts here?

rossanag commented 8 years ago

I was reading the link you post, I don't have time to try it right now to know how difficult it is. But it could be easier to put an example at least of some of the most used configurations options. In my case I need it to be configured to spanish, I guess the 'sp' parameter is the correct one. Is it supported? I appreciate any hints, thanks

PS: In case I have problems I will post something

kevinkreiser commented 8 years ago

we currently only support en-US and are working on adding other languages. we hope to offer a means by which users who are interested in a particular language can add those translations. you can follow this development effort over here: https://github.com/valhalla/odin/issues

as for what the language would be, if you live in Spain for example your language/locale might be: es-ES

rossanag commented 8 years ago

Thanks for your response, I will check this issues. Best!

hanbyul-here commented 8 years ago

I second for examples @rossanag , it is true that lrm-mapzen doesn't have exposed function for directions-options yet. This will be another issue and reflected on next update of lrm-mapzen!