Accessing a session's locale ID array

Questions regarding the use of the High Perfomance SDK for Server development

Moderator: uasdkhpc

Post Reply
bswann
Jr. Member
Jr. Member
Posts: 4
Joined: 08 May 2017, 11:00

Accessing a session's locale ID array

Post by bswann »

Hi,

I'm looking at how to support localisation with the HP SDK. I assume I'd need to intercept reading of attributes for any localised text in a custom read service handler.

Is it possible to access the array of locale IDs provided by the client during session activation?

Kind regards,
Brett

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

Re: Accessing a session's locale ID array

Post by Support Team »

Hi Brett,

at the moment this is not possible without modifying the SDK.
But the address space is already designed to work with localization,
which will be added in a later version.

The concept is already that all nodes contain only indices into the string table.
This avoids sting redundancies, but also allows easy localization.
By having one string table for each locale the SDK simply needs to lookup the string index in the correct table.

This will be done in future implementations by the SDK itself (default service implementations like browse_internal and read_internal).

Also note that we are currently working on a new binary file format which will be released with V1.1.0.
Here we have already defined the format in a way which allows to store multiple string tables for different locales.

What is missing for this feature is then the following:
* storing the localeid array of ActivateSession in the session context (the session context is available in all services requests)
* implementing localized string table lookup in our default service implementations

This will be implemented hopefully in V1.2.0 in 2018, but there is no guarantee for this yet.

For you this means, either wait for this new feature, or implement this on your own.
for the first point you would need to change SDK code, but it should be a small change
for the second point you can also implement your own versions of read/browse in the provider.
you don't need to modify the SDK default service implementations for this.
Best regards
Unified Automation Support Team

bswann
Jr. Member
Jr. Member
Posts: 4
Joined: 08 May 2017, 11:00

Re: Accessing a session's locale ID array

Post by bswann »

Thank you for the quick response, it is very helpful; it is great to see that the SDK will provide this functionality in the future.

Kind regards,
Brett

Post Reply