Localized alarm text messages.

Questions regarding the use of the C++ SDK for Server or Client development or integration into customer products ...

Moderator: uasdkcpp

Post Reply
frigo
Jr. Member
Jr. Member
Posts: 1
Joined: 22 Oct 2010, 14:23

Localized alarm text messages.

Post by frigo »

Hello.
I have a question about localized strings in OPC UA server, especially alarm messages.
When the client connects to the OPC UA server, in the session there should be also an information about localization (en, fr, de,....).
Is it possible to send an event to the client with localized text based on the localization set in the session?
If I'm correct. C# stack has some "resource manager" which should take care of this.
What is the C++ way to make it working?

Thank you for any responses/hints

BR
Dundee.

User avatar
Support Team
Hero Member
Hero Member
Posts: 3072
Joined: 18 Mar 2011, 15:09

Re:Localized alarm text messages.

Post by Support Team »

Hi Dundee,

Any event data class is from derived from BaseEventTypeData. You can derive an application specific class from the event type data class used and you can overwrite BaseEventTypeData::getMessageValue() there. The Session passed in to this method contains the LocaleIds requested by the client. Session::getLocalId() provides the preferred LocaleId specified by the client. Session::getLocalIds() provides the full list if the client specified a list of LocaleIds.

There is a feature request to provide a general translation table for the whole server. It is not decided yet when this general feature will be available.

Best Regards,
Unified Automation Support Team
Best regards
Unified Automation Support Team

Post Reply