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: 81
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: 321
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: 81
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: 1010
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: 518

Currently Online: Manfred Hausmann
13 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

hbrackel: 135

pramanj: 86

Francesco Zambon: 81

rocket science: 77

Ibrahim: 76

Sabari: 62

kapsl: 57

gjevremovic: 49

Xavier: 43

fred: 41

Member Stats:

Guest Posters: 0

Members: 681

Moderators: 16

Admins: 1

Forum Stats:

Groups: 3

Forums: 15

Topics: 1467

Posts: 6261

Newest Members:

graciela2073, sagarchau, elviralangwell4, Donnavek, Eddiefauth, DonaldPooma, fidelduke938316, Jan-Pfizer, DavidROunc, fen.pang@woodside.com

Moderators: Jouni Aro: 1010, Otso Palonen: 32, Tuomas Hiltunen: 5, Pyry: 1, Petri: 0, Bjarne Boström: 983, Heikki Tahvanainen: 402, Jukka Asikainen: 1, moldzh08: 0, Jimmy Ni: 26, Teppo Uimonen: 21, Markus Johansson: 42, Niklas Nurminen: 0, Matti Siponen: 321, Lusetti: 0, Ari-Pekka Soikkeli: 5

Administrators: admin: 1