Closed johny8228 closed 6 years ago
The keys depend on the implementation of the profiles. Currently it just returns the exact same string because the profiles are code in English. You can see this here for example:
https://github.com/itinero/routing/blob/develop/src/Itinero/Osm/Vehicles/car.lua#L293
The key in this line:
instruction.text = itinero.format(language_reference.get("Take the {0}th exit at the next roundabout."), "" .. exit)
is this string
"Take the {0}th exit at the next roundabout."
That's what needs translating. I suggest you make a translate dictionary but build a set of regression tests for each update of the profile to make sure everything is translated. If you need it translated and maintained, feel free to submit a pull request.
Also, I know this way of providing translations is far from perfect, any ideas you have for future versions, let us know.
@xivk thank you for your answer, much appreciated.
Closing this, it's on the roadmap to improve on this for Itinero 2.0, feel free to reopen if you have any more questions.
I would like to add a new language for routing instructions. I've seen that I need to implement this interface ILanguageReference and this basically consists of a Dictionary. My question is : where can I find the Dictionary with all the keys need it in English so that I can translate?
Thanks, Johnny