Avatar

Please consider registering
guest

sp_LogInOut Log In sp_Registration Register

Register | Lost password?
Advanced Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

sp_Feed Topic RSS sp_TopicIcon
HelpOffNormalAlarmTypeNode translation
April 6, 2023
12:42, EEST
Avatar
Francesco Zambon
Member
Members
Forum Posts: 83
Member Since:
December 20, 2021
sp_UserOfflineSmall Offline

Good morning,

I created a new alarm object HelpOffNormalAlarmTypeNode

HelpOffNormalAlarmTypeNode alarm = nodeManagerUaNode.createInstance(HelpOffNormalAlarmTypeNode.class, "MyAlarm", new NodeId(nodeManagerUaNode.getNamespaceIndex(), "MyAlarm"));

I added translations for the DisplayName attribute

LocalizedText fr = new LocalizedText("Mon Alarm", "fr_FR");
LocalizedText en = new LocalizedText("My Alarm", "en_GB");
alarm.setDisplayName(fr);
alarm.setDisplayName(en);

I set the locale of the UAExpert client

Settings -> Configure UaExpert
General.LocaleId: en-GB / fr-FR / …

and I correctly see the translation of the DisplayName attribute.

Question:
Do you think it is possible to add translations also for the PropertyType Message?
The DataType of Message is LocalizedType, but I would need to set multiple translations.

alarm.setMessage(…);

Thanks,
Francesco

April 6, 2023
13:45, EEST
Avatar
Matti Siponen
Moderator
Members

Moderators
Forum Posts: 349
Member Since:
February 11, 2020
sp_UserOfflineSmall Offline

Hello,

The DataType of Message Property is LocalizedText so it could have different values for different Locales. However, the SDK does not provide built-in support for setting the Value Attribute of Message Property in multiple different Locales. To provide different values based on Locales of the Session reading the Value of the Property, you could use either IoManager or IoManagerListener. For another discussion on this topic, see https://forum.prosysopc.com/forum/opc-ua-java-sdk/differente-translation-in-every-node/

The value of the Message Field in HelpOffNormalAlarmType Events (and all types of Events in general) can not be modified when sending the Event to a Client based on the Locales of the Session that has Subscribed to Events.

April 6, 2023
17:38, EEST
Avatar
Francesco Zambon
Member
Members
Forum Posts: 83
Member Since:
December 20, 2021
sp_UserOfflineSmall Offline

Dear Matti,

Thanks for your help.

Please can you tell me if this behavior is caused by a limitation of the OPC UA specification or by the SDK?
“The value of the Message Field in HelpOffNormalAlarmType Events (and all types of Events in general) can not be modified when sending the Event to a Client based on the Locales of the Session that has Subscribed to Events.”

Best regards,
Francesco

April 6, 2023
21:46, EEST
Avatar
Jouni Aro
Moderator
Moderators
Forum Posts: 1026
Member Since:
December 21, 2011
sp_UserOfflineSmall Offline

It’s due to the SDK at the moment. The idea of LocalizedText is of course that each client would be able to get the texts in their preferred locale.

The localization has not been very important to our customers so far, so we haven’t put much effort in the details. But, I don’t think it would be very difficult to improve this a bit, if you need it. How important are these localization issues for your application?

Forum Timezone: Europe/Helsinki

Most Users Ever Online: 1919

Currently Online:
20 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

Heikki Tahvanainen: 402

hbrackel: 144

rocket science: 88

pramanj: 86

Francesco Zambon: 83

Ibrahim: 78

Sabari: 62

kapsl: 57

gjevremovic: 49

Xavier: 43

Member Stats:

Guest Posters: 0

Members: 726

Moderators: 7

Admins: 1

Forum Stats:

Groups: 3

Forums: 15

Topics: 1529

Posts: 6471

Newest Members:

gabriellabachus, Deakin, KTP25Zof, Wojciech Kubala, efrennowell431, wilfredostuart, caitlynfajardo, jeromechubb7, franciscagrimwad, adult_gallery

Moderators: Jouni Aro: 1026, Pyry: 1, Petri: 0, Bjarne Boström: 1032, Jimmy Ni: 26, Matti Siponen: 349, Lusetti: 0

Administrators: admin: 1