Page 1 of 2

Multi-lingual Labels and Traffic Incidents tooltip text

Posted: Thu Jun 25, 2020 4:22 am
by nirengp
Hi Bernd, Oli,

Our application has multi-lingual support. So user can select the application language when they login.
Now when Map is displayed we want to show the labels and traffic incident tool tip text also in the user selected language.
At present label language is the default language of the xServer. And in xServer.Net Map control, culture based partial language translation is in use. However, text received from xServer is still in default language.
We are using XServer-1 on premise and PTV xServer Version is 1.24.0.3.

As per my investigation I found following probable options to achieve our requirements: I think for xServer-2, their is an option to set language in layer. Since we are using xServer-1 how can we do something similar. So that we can set the language code in the Map control itself and also for FeatureLayer for Traffic Incidents tooltip text language.

Please point me in right direction how to achieve our requirements.

Re: Multi-lingual Labels and Traffic Incidents tooltip text

Posted: Thu Jul 02, 2020 10:17 am
by Bernd Welter
Hello Niren,

let me first provide several statements on a generic level: Maybe the details have to be discussed 1:1 between you and me.
  • In xServer1 (2020) the Traffic Incidents are available through two approaches: TrafficInfoLoader and Content Update Service gather the info to an installed server. GeoDataSourceLayer and FeatureLayer are the mechanisms that enable an API user to consider the content in routing and mapping.
  • Traffic Info Loader is slowly phasing out - I'm, not sure how long this approach will be supported. Please check how to migrate to ContentUpdateService/FeatureLayers and also to xServer2.
  • In a native mapping request of xMap1 you can change the language through a CallerContextProperty driven snippet:

    Code: Select all

    <CallerContextProperty key="ProfileXMLSnippet" 
    value="<Profile xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
    xsi:noNamespaceSchemaLocation="http:///xmap/schema/XMapProfile.xsd"><
    Common language="DE" majorVersion="1" 
    minorVersion="0"/></Profile>" />
  • In xServer2 the REST API offers a URL parameter userLanguage.
  • For further info I need the developers who implemented the .NET control - I'll approach them
Best regards,
Bernd

Re: Multi-lingual Labels and Traffic Incidents tooltip text

Posted: Wed Jul 08, 2020 1:45 pm
by Oliver Heilig
Hi,

i have updated the sample

https://github.com/ptv-logistics/xserve ... tureLayers

for different message languages.

Note: This only affects the xServer messages itself, not the caption of the Tooltip-Labels (which are controlled by the CurrentUICulture), and not the transformation to imperial units.

Oli

Re: Multi-lingual Labels and Traffic Incidents tooltip text

Posted: Wed Jul 08, 2020 1:48 pm
by Bernd Welter
Awesome, thank you, Oli!
Niren - it's up2you now ;)

Re: Multi-lingual Labels and Traffic Incidents tooltip text

Posted: Thu Jul 09, 2020 5:12 am
by nirengp
Hello Bernd, Oli,

Thanks for the details.
It is working. :)
The solution is much simpler then expected. ;)

Re: Multi-lingual Labels and Traffic Incidents tooltip text

Posted: Thu Jul 09, 2020 7:03 am
by nirengp
Hello Oli,

The language labels works for English and Deutsch ( German ) language in PTV xServer.Net control.
German:
2020-07-09 12_26_02_DE.png
English:
2020-07-09 12_27_21_EN.png
French:
2020-07-09 12_25_14_FR.png

However, any chance their will be support for other languages like French, Polish and Russian for caption of the Tooltip-Labels (which are controlled by the CurrentUICulture)? Or is their a way where we can implement and use it ourself?

Re: Multi-lingual Labels and Traffic Incidents tooltip text

Posted: Thu Jul 09, 2020 7:34 am
by Bernd Welter
Hello Niren,

from my understanding we currently support
- EN = English
- DE = German
- FR = French

Check this article about UC_Displaying_traffic_situation

I now forwarded the topic to the experts of FeatureLayer and Data ;-)

Best regards,
Bernd

Re: Multi-lingual Labels and Traffic Incidents tooltip text

Posted: Thu Jul 09, 2020 8:13 am
by Bernd Welter
I have some good news and some bad ones:

Good news: we have texts in other languages such as Italian and Dutch in xMap 2:
dutch on xServer2 showcase
dutch on xServer2 showcase
italian on xServer2 showcase
italian on xServer2 showcase
The bad news: looks like the FeatureLayers usage in xServer1 does no support these two languages.

How about switching from xMap1 to xMap2?
Not sure whether this requires much coding.

Best regards,
Bernd

Re: Multi-lingual Labels and Traffic Incidents tooltip text

Posted: Thu Jul 09, 2020 8:22 am
by nirengp
Hello Bernd,

Well, for switching from xServer 1 to xServer 2 need to investigate options to decide:

Is their any place I can look at differences between xServer 1 and 2?
And what are the migration options from xServer 1 to xServer 2?
Can xServer 1 and 2 co-exist so that we can use both until we have migrated our application totally?

Re: Multi-lingual Labels and Traffic Incidents tooltip text

Posted: Thu Jul 09, 2020 8:48 am
by Bernd Welter
Hello Niren,

maybe it would be sufficient to replace the xMap1 by xMap2 which is both supported by the xServer.NET control?
I'll ask Oliver whether there's more to check.

A complete replacement of xServer1 by xServer2 is a story we should handle 1:1 including other stakeholders of your company as this is a strategic decision.

Best regards,
Bernd