AnsweredAssumed Answered

Multi Lingual Support in CMIS

Question asked by kimbad on Jan 12, 2012
Latest reply on Feb 6, 2013 by gran
I have created a Multi Lingual space in Alfresco. To this I have added my root document test.txt with the language set to EN. To this I have added a translated document FR_test.txt with the language set to FR. If I set my viewing preferences in Alfresco to French then I correctly see only FR_test.txt in the space.

I can now retrieve test.txt from the space using OpenCMIS.

The next step is to be able to set the locale in the cmis session to FR and automatically retrieve FR_test.txt instead of test.txt. 

I have tried this


params.put(SessionParameter.LOCALE_ISO3166_COUNTRY, "");
params.put(SessionParameter.LOCALE_ISO639_LANGUAGE, "fr");
params.put(SessionParameter.LOCALE_VARIANT,"FR");

Session session = SessionFactoryImpl.newInstance().createSession(params);
CmisObject obj = session.getObjectByPath("/MultilingualSpace/test.txt");

but is still get test.txt.

I am not sure if what I am doing is possible or I need to add some processing to determine the translated document from the properties of the root document. I know I could prefix the document name with the locale but this forces a naming convention in Alfresco that I can't enforce.

Any suggestions or pointers gratefully received….

Thanks,
Kim

Outcomes