Dear Forum Members,
We are using PTV xRoute 1.18.0.0 to return maneuvers in different languages. We often need the same route in more than one language, but we want to avoid querying xRoute multiple times.
We have come up with the following workaround for this problem: We parse the language definition file (RLTrans_ISO639-1.xml) from code. There, we also define an additional language (code: GA) which is a simple markup used to replace strings from any other language defined in the xml. That is, we only query xRoute maneuvers once with code GA. We parse the xml file, then replace the markup strings eg. "{Continue.Text}" with the corresponding strings in the selected language. So any time we need the same maneuver in another language, we can translate it quickly without the need to query the xRoute server. I have attached the C# code, I hope someone might find it useful.
I wonder if there is a built-in way to achieve the same thing?
Thanks,
Balázs
Multi-language maneuvers
-
- Posts: 6
- Joined: Fri May 30, 2014 1:01 pm
Multi-language maneuvers
- Attachments
-
- Languages.zip
- (11.94 KiB) Downloaded 534 times
- Bernd Welter
- Site Admin
- Posts: 2684
- Joined: Mon Apr 14, 2014 10:28 am
- Contact:
Re: Multi-language maneuvers
Hello Balazs,
what I recommend to be safe is to send another transaction to xroute but with a reduced ResultListOption setting: just request the texts and the manouevers - disable the polygon, the segments, nodes and any other redundant option...).
Working with text replacement is "at your own risk" because you can never be sure how we produce the sytnax and semantics internally...
Regards from Germany,
Bernd
what I recommend to be safe is to send another transaction to xroute but with a reduced ResultListOption setting: just request the texts and the manouevers - disable the polygon, the segments, nodes and any other redundant option...).
Working with text replacement is "at your own risk" because you can never be sure how we produce the sytnax and semantics internally...
Regards from Germany,
Bernd