.NET Based OPC UA Client/Server SDK
3.1.0.500
|
The Demo Server contains an example for a variable containing localized data in the folder Objects → Demo → 011_UnicodeTest. The variable IDS_HELLO_WORLD has localizations for display name, description, and the value in English, German, and French.
The variable IDS_HELLO_WORLD is created in the method SetupLocalizedVariable which can be found in the file Demo → DemoNodeManager.cs in the Visual Studio Solution for the Demo Server.
The individual translations have to be added to the ResourceManager as shown in the following code snippet.
UnifiedAutomation.UaServer.ResourceManager
When in-memory nodes are read, the Translate method of the ResourceManager is called by the SDK automatically.
To test the translations, set the configuration parameter General.LocaleId of UaExpert to de-DE, connect to the .NET Demo Server and read the Variable. The german localizations of DisplayName, Description and Value will show up (see screenshot).