Translating the alert message in catalog client script to another language
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-09-2022 05:29 AM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-09-2022 05:35 AM - edited 12-09-2022 05:37 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-09-2022 05:40 AM
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

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-03-2023 06:45 AM
This worked like a charm, thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-30-2023 11:54 PM
This works, thanks!