Search code examples
javakotlinosmdroidosrmosmbonuspack

How do I select a language in OSRM's RoadManager


I need to force OSRM to switch the language in road.mNodes.mInstructions to English in order to work with English TTS. How do I achieve that in Kotlin? I'm using OSRMRoadManager from OSMBonusPack.


Solution

  • I've actually managed to find a workaround which suits my needs, without needing to subclass OSRMRoadManager and all that. For anyone with the same problem - I've switched the language using Locale, as shown here. Nevertheless, I think it's probably something that should be in OSMBonusPack as an option, in case one wants to preserve the default language in some other parts of the app. I can try looking into the lib myself.