cancel
Showing results for 
Search instead for 
Did you mean: 

How to add multilingual metadata?

vipul
Champ in-the-making
Champ in-the-making
Hi
I am using below code to add multilingual metadata.

//Added multilingual aspect….ContentModel.ASPECT_MULTILINGUAL_DOCUMENT

// Added Locale as Simplified Chinese.
PropertyValue propertyValue = new PropertyValue(DataTypeDefinition.ANY, Locale.SIMPLIFIED_CHINESE);
avmService.setNodeProperty(createdPath, ContentModel.PROP_LOCALE, propertyValue);

// Adding a metadata which is defined as mltext in content-model.
propertyValue = new PropertyValue(DataTypeDefinition.MLTEXT, new MLText(Locale.SIMPLIFIED_CHINESE, "華盛頓郵報:北韓助"));
avmService.setNodeProperty(createdPath, CustomContentModel.PROPERTY_HEADLINE, propertyValue);

After executing, when i go to view property (alfresco web-client), it shows "??????????",  it should show simplified chinese characters on
It will be great if somebody can help me to resolve this.
1 REPLY 1

vipul
Champ in-the-making
Champ in-the-making
OK…..Got the solution….
In mysql.ini file, default encoding was latin….I just chagned it to etf8 and re-created the database…It worked fine..

I prefer to use UTF8, i changed the query (extras\databases\mysql\db_setup.sql) while installing Alfresco.
create database alfresco CHARACTER SET utf8 COLLATE utf8_general_ci;  Smiley Happy