Where to find documentation on this.msg()

cancel
Showing results for 
Search instead for 
Did you mean: 
kenneth-venken
Active Member

Where to find documentation on this.msg()

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");
1 Reply
cristinamr
Advanced

Re: Where to find documentation on this.msg()

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.

 

--
VenziaIT: helping companies since 2005! Our ECM products: AQuA & Seidoc