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

Worked, Thank you

It worked 🙂
Thanks!!!

Hi Raghav,

 

I have a similar requirement, trying to show an alert message in different languages on the portal. But it is not working as expected.

 

Below is my code placed in widget(client script). If possible for you, could you please let me know if I need to modify anything in the below code.

getMessage('Downloaded_Report_successfully', function(translatedMessage) {

alert(translatedMessage);

});

jaheerhattiwale
Mega Sage

@Chetan Marathe Detailed ServiceNow documentation link.

 

https://docs.servicenow.com/en-US/bundle/tokyo-platform-administration/page/administer/localization/...

 

Please mark as helpful or correct answer based on impact

Please mark the answer as correct or helpful based on impact
ServiceNow Community Rising Star, Class of 2023