AnsweredAssumed Answered

Localize label from custom model

Question asked by h.deselys on Jul 29, 2014
Latest reply on Aug 5, 2014 by kaynezhang
Hello,

I have tried for a moment to change the localization of my custom labels.

I have a custom model defined in customModel.xml placed alfresco/extension/model/. In alfresco/extension/messages/, I have set my labels in different languages. So I have several files: custom-model.properties (default), custom-model_fr_FR.properties and custom-model_en_GB.properties with this kind of expression:

custom_model.property.custom_property.title=Ma propriété
custom_model.aspect.custom_aspect.title=Mon aspect


I use Alfresco for another web application through OpenCMIS. Is there a way to tell to Alfresco which .properties file takes into account?

I tried some localization parameter when I initialize the sessions CMIS but with no results:

//Localization parameter
Map<String, String> parameter = new HashMap<String, String>();
parameter.put(SessionParameter.LOCALE_ISO3166_COUNTRY, "FR");
parameter.put(SessionParameter.LOCALE_ISO639_LANGUAGE, "fr");
parameter.put(SessionParameter.LOCALE_VARIANT, "");


I succeed to switch between these languages only when I delete one of them, but I want to be able to switch to each other without having the need to reboot my Alfresco instance.

Thanks in advance.

Outcomes