- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-21-2025 01:10 AM
Hello
iam facing issue with a show feild message to dispaly it in french when a french user logged in
i have tried using
if(g_lang=="en"){
//put english text
}else{
//put french text
}
but this script is not working out in workspace is any other way we can figure it out
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-21-2025 01:16 AM
1) Create the message translation in the sys_ui_message table
2) Create Records with languages you need
3) use this script
getMessage("YOUR_MESSAGE_KEY", function(msgString) {
g_form.showFieldMsg('field_name', msgString, 'error');
});
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-21-2025 01:16 AM
1) Create the message translation in the sys_ui_message table
2) Create Records with languages you need
3) use this script
getMessage("YOUR_MESSAGE_KEY", function(msgString) {
g_form.showFieldMsg('field_name', msgString, 'error');
});
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader