Page 1 of 1

Multi-language maneuvers

Posted: Wed Jun 25, 2014 11:40 am
by kecskemetib
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

Re: Multi-language maneuvers

Posted: Wed Jun 25, 2014 2:26 pm
by Bernd Welter
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