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.
Localized alarm text messages.
Moderator: uasdkcpp
- Support Team
- Hero Member
- Posts: 3072
- Joined: 18 Mar 2011, 15:09
Re:Localized alarm text messages.
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
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
Unified Automation Support Team