cancel
Showing results for 
Search instead for 
Did you mean: 

Model Properties localized labels

castgroupteam
Champ in-the-making
Champ in-the-making
Hi, is it possible to retrieve type and aspect's property titles (labels) through cmis with the correct localization text?
I've registred my content model with a message bundle and all is working fine within Alfresco Share but if I try to integrate an external application throug the Apache OpenCmis libraries, even setting the correct locale, when I am opening the cmis session:

         cmisParameter.put(SessionParameter.LOCALE_ISO3166_COUNTRY, "IT");
         cmisParameter.put(SessionParameter.LOCALE_ISO639_LANGUAGE, "it");
         cmisParameter.put(SessionParameter.LOCALE_VARIANT, "");

the property.getDisplayName() method always return the value from the EN bundle.
There is a workouround?

P.S
The mltext values instead return the correct value based on the session parameters localization properties.

Thanks in advance.

Daniele
2 REPLIES 2

afaust
Legendary Innovator
Legendary Innovator
Hello,

I don't think it is possible to get properly localized values via the CMIS dictionary at the moment. As far as I see in the server-side code, all the definitions of types, aspects and properties are initialized once from the base dictionary using the server locale (which may not be EN depending on your setup). Upon client access, only the previously resolved label is returned.

I'd suggest opening up a JIRA ticket if one doesn't exist already to address this.
The only workaround would be changing your server locale, which only works as a work around if you only want to support a single, specific locale in your application.

Regards
Axel

castgroupteam
Champ in-the-making
Champ in-the-making
Thank you for your help.
The solution is not to change the locale of the server because I am developing a multilingual application. This is not a big problem because I can use a local bundle on the client side. Of course would be very nice to use the Alfresco localization service instead for the document's labels so I will raise a JIRA ticket as soon as possible.

Regards
Daniele