Translating the alert message in catalog client script to another language

Chetan Marathe
Tera Contributor

Hello, 

 

I wrote a catalog client script to get an error message.

In that I used alert(); to get that message. 

Now I want to translate the message into another language.

Can you please help with this?

I have also tried to create a Key in Messages>> in>> System Localization.

 

Thanks,

Chetan Marathe

8 REPLIES 8

Community Alums
Not applicable

RaghavSh
Kilo Patron

1. use below code instead of alert.

getMessage('alert_message', function(msg){alert(msg);});

 2. create an entry in "sys_ui_message" table for the alert message you are passing above in required language.


Please mark the answer correct/helpful accordingly.


Raghav
MVP 2023

This worked like a charm, thanks!

This works, thanks!