cancel
Showing results for 
Search instead for 
Did you mean: 

get multilanguage property title

mezga
Champ in-the-making
Champ in-the-making
I am writing a custom alfresco java backed webscript.
I want to fetch the title of a custom type-property.
I need the title in several languages.



I got back a DataTypeDefinition on the following way, bu do not got back the title.
How can I get it? and how do I get the other languages?

<java>
         Map<QName,PropertyDefinition> definitions = dictionaryService.getPropertyDefs(QName.createQName(CUSTOM_NAMESPACE, CUSTOM_TYPE001));
         QName propertyQName = QName.createQName(CUSTOM_NAMESPACE, "propname");
         PropertyDefinition def = definitions.get(propertyQName);
         DataTypeDefinition dataType = def.getDataType();
         String title = dataType.getTitle(null);
<java>

1 REPLY 1

mezga
Champ in-the-making
Champ in-the-making
I could solve the problem, I enter here for the record:

<java>
   String messageKey = "myPrefix_mymodel.property.myprefix_myproperty.title";
   messageService.setLocale(loc);
   String title = messageService.getMessage(messageKey);