In an Alfresco Share javascript file (my-tasks.js) they use this.msg() all over the place. I was wondering where I can find any documentation on this function. More specifically I would want to know how and where the labels are defined (and how to define custom ones).
Some examples:
this.msg("title.editTask"); this.msg("label.taskSummary); this.msg("workflow.no_message");
Good morning.
This is something related to i18n. As far as I remember, you'll need to define your own show-custom-message.properties, which contains the definition of your own custom properties, something like e.g.:
alfresco.tutorials.doclib.action.showCustomMessage.text=Showing custom message for {0} and {1} alfresco.tutorials.doclib.action.showCustomMessage.label=Show Message
Then from your development, you can access like this:
fn: function org_alfresco_training_onShowCustomMessage(file) { Alfresco.util.PopupManager.displayMessage( { text: this.msg("alfresco.tutorials.doclib.action.showCustomMessage.text", file.displayName, Alfresco.constants.USERNAME) }); }
I think there's no specific documentation for this but you can find more info of these examples here and here. You can find some documentation here as well.
Cheers,
Cristina.
Ask for and offer help to other Alfresco Content Services Users and members of the Alfresco team.
Related links:
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.