The CreatorCon Call for Content is officially open! Get started here.

How to translate message in client controller widget in the service portal?

String
Kilo Sage

Hi All,

We are developing the catalog portal and we are unable to convert the below message 'please wait for response' and 'Please add Values'.Please suggest the syntax 

 

we created a records in sys_ui_message

 

 

api.controller = function($scope, spUtil) {

    /* widget controller */

    var c = this;

    try {

        $scope.getreset = function() {

  var msg = confirm('please wait for response');

            if (!msg) {

  return false;

            } else {

$scope.page.g_form.setValue('test','12');

  }

 

if (inputs.test == "") {
spUtil.addErrorMessage("Please add Values");
return false;
}

        };

    } catch (exception) {

}

};

1 ACCEPTED SOLUTION

Ahmmed Ali
Mega Sage
Mega Sage

Hello @String 

 

You can get translated data from server script and then add that in message in client side.

 

Example server:

data.waitMessage = gs.getMessage("please wait for response");

 

Client:

var msg = confirm(c.data.waitMessage);

 

Note: Verify the syntax for above statement once.

 

Thank you,

Ali

 

 

 

If I could help you with your Query then, please hit the Thumb Icon and mark my answer as Correct!!

Thank you,
Ali

View solution in original post

1 REPLY 1

Ahmmed Ali
Mega Sage
Mega Sage

Hello @String 

 

You can get translated data from server script and then add that in message in client side.

 

Example server:

data.waitMessage = gs.getMessage("please wait for response");

 

Client:

var msg = confirm(c.data.waitMessage);

 

Note: Verify the syntax for above statement once.

 

Thank you,

Ali

 

 

 

If I could help you with your Query then, please hit the Thumb Icon and mark my answer as Correct!!

Thank you,
Ali