cancel
Showing results for 
Search instead for 
Did you mean: 

Multilingual metadata using JavaScript

santigt
Champ in-the-making
Champ in-the-making
Hi all!

I want to use Alfresco JavaScript to create webscripts. The problem is that I don't know how can I fill multilingual properties.

When I import contents, I put this:

<cm:biography>{en=this is the biography,es=esta es la biografia}<cm:biography> 

Obviously, If I put this in JavaScript, the property has this value:

biography: {en=this is the biography,es=esta es la biografia}

In Java I know that the I18N class can change the Locale variable into any language, and with this I can write different values. But in JavaScript I don't know how can I change language or how can I put different values in a multilingual property.

Please help me if you can!

Regards,


Santigt
2 REPLIES 2

paulhh
Champ in-the-making
Champ in-the-making
Hi

It's one of those bits we haven't got to yet.  You'll have to do the setting through Java at the moment - but you can still use the Web Script framework with Java backing the actions.

Cheers
Paul.

santigt
Champ in-the-making
Champ in-the-making
So, using Freemarker in web scripts, can I access to Locale value?? And, if I change this variable, can I use the multilingual metadata option? Example:

<#assign locale="es_ES">
node.properties['cm:description']="En español";
node.save();
<#assign locale="en_EN">
node.properties['cm:description']="In english";

Thanks so much! Regards,


Santigt


Hi

It's one of those bits we haven't got to yet.  You'll have to do the setting through Java at the moment - but you can still use the Web Script framework with Java backing the actions.

Cheers
Paul.