Multi-lingual Labels and Traffic Incidents tooltip text

Within this forum we want to offer discussions all around our .NET based Map control including all .Net-language specific questions concerning calls of the xServer-API. Attention: xServer-relevant concepts can be found in further forums such as xRoute or xTour.
nirengp
Posts: 15
Joined: Wed Jun 28, 2017 12:54 pm

Multi-lingual Labels and Traffic Incidents tooltip text

Post 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.
Regards,
Niren Patel
Core Developer
BRABENDER tech
User avatar
Bernd Welter
Site Admin
Posts: 2564
Joined: Mon Apr 14, 2014 10:28 am
Contact:

Re: Multi-lingual Labels and Traffic Incidents tooltip text

Post 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
Bernd Welter
Technical Partner Manager Developer Components
PTV Logistics - Germany

Bernd at... The Forum,LinkedIn, Youtube, StackOverflow
I like the smell of PTV Developer in the morning... :twisted:
User avatar
Oliver Heilig
Posts: 154
Joined: Tue May 13, 2014 12:10 pm
Location: Karlsruhe, Germany
Contact:

Re: Multi-lingual Labels and Traffic Incidents tooltip text

Post 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
Attachments
TiMessage.png
Oliver Heilig
Chief Developer Logistic Services
PTV GROUP - Germany

https://github.com/oliverheilig/
User avatar
Bernd Welter
Site Admin
Posts: 2564
Joined: Mon Apr 14, 2014 10:28 am
Contact:

Re: Multi-lingual Labels and Traffic Incidents tooltip text

Post by Bernd Welter »

Awesome, thank you, Oli!
Niren - it's up2you now ;)
Bernd Welter
Technical Partner Manager Developer Components
PTV Logistics - Germany

Bernd at... The Forum,LinkedIn, Youtube, StackOverflow
I like the smell of PTV Developer in the morning... :twisted:
nirengp
Posts: 15
Joined: Wed Jun 28, 2017 12:54 pm

Re: Multi-lingual Labels and Traffic Incidents tooltip text

Post by nirengp »

Hello Bernd, Oli,

Thanks for the details.
It is working. :)
The solution is much simpler then expected. ;)
Regards,
Niren Patel
Core Developer
BRABENDER tech
nirengp
Posts: 15
Joined: Wed Jun 28, 2017 12:54 pm

Re: Multi-lingual Labels and Traffic Incidents tooltip text

Post 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?
Regards,
Niren Patel
Core Developer
BRABENDER tech
User avatar
Bernd Welter
Site Admin
Posts: 2564
Joined: Mon Apr 14, 2014 10:28 am
Contact:

Re: Multi-lingual Labels and Traffic Incidents tooltip text

Post 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
Bernd Welter
Technical Partner Manager Developer Components
PTV Logistics - Germany

Bernd at... The Forum,LinkedIn, Youtube, StackOverflow
I like the smell of PTV Developer in the morning... :twisted:
User avatar
Bernd Welter
Site Admin
Posts: 2564
Joined: Mon Apr 14, 2014 10:28 am
Contact:

Re: Multi-lingual Labels and Traffic Incidents tooltip text

Post 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
Bernd Welter
Technical Partner Manager Developer Components
PTV Logistics - Germany

Bernd at... The Forum,LinkedIn, Youtube, StackOverflow
I like the smell of PTV Developer in the morning... :twisted:
nirengp
Posts: 15
Joined: Wed Jun 28, 2017 12:54 pm

Re: Multi-lingual Labels and Traffic Incidents tooltip text

Post 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?
Regards,
Niren Patel
Core Developer
BRABENDER tech
User avatar
Bernd Welter
Site Admin
Posts: 2564
Joined: Mon Apr 14, 2014 10:28 am
Contact:

Re: Multi-lingual Labels and Traffic Incidents tooltip text

Post 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
Bernd Welter
Technical Partner Manager Developer Components
PTV Logistics - Germany

Bernd at... The Forum,LinkedIn, Youtube, StackOverflow
I like the smell of PTV Developer in the morning... :twisted:
Post Reply