cancel
Showing results for 
Search instead for 
Did you mean: 

message bundles

igor_shaldev
Champ in-the-making
Champ in-the-making
Is there a way to use the localized message bundles (I18N Strings) inside the javascript code of the web scripts?

Best regards,
Igor
6 REPLIES 6

mikeh
Star Contributor
Star Contributor
Yes there is!

Use msg.get(messageid)

Thanks,
Mike

igor_shaldev
Champ in-the-making
Champ in-the-making
Thanks I'll try it now

lista
Star Contributor
Star Contributor
More information can be fond here:

http://wiki.alfresco.com/wiki/Web_Scripts#Message_Bundles

Cheers,
Lista.

iblanco
Confirmed Champ
Confirmed Champ
Ummm, it does not seem to work for the Javascript in workflows.
Is there any other root object or way that can be used in workflows?

ddraper
World-Class Innovator
World-Class Innovator
When you say doesn't work, how do you mean? The msg.get() function relies on retrieving messages from either the WebScript property bundle or the global property bundle.

iblanco
Confirmed Champ
Confirmed Champ
It throws an exception saying that msg is undefined. Inspecting the execution with the Javascript Debugger the msg root object doesn't appear to exist either.
This is a Service task that executes the script code not a User task. Might this be the reason ? Is it possible that this root object is only present in user task listeners ?