logo

NJP

Multilingual Notifications- NOW made easy!

Import · Dec 27, 2021 · article

Creating multilingual notification is a usual ask in any customer instance having multiple languages. There are multiple ways to configure it and SN suggests to create separate notification for each language.

Translating Email Notification - Support and Troubleshooting (servicenow.com)

However I have configured in similar way for some customers but this time I thought to give it a try to utilize with single notification. Here is my approach.

1. Activate the respective language plugin.

Translating Email Notification - Support and Troubleshooting (servicenow.com)

2. Create a new notification with the content being generated from mail script.

image

3. Create language respective message in System Localization > Messages

English:

image

French:

image

4. Write the mail script as

var userLang = current.caller_id.preferred_language;
var objArray = [current.caller_id.name,current.number];
var content = gs.getMessageLang("dn.notification.body",userLang,objArray);
template.print(content);

Notice the getMessageLang() function, this will fetch the message according to the Caller's language. Thanks @Mark Roethof for this image

Thats it!

Result:

English:

image

French:

image

Though this works perfectly when there are single recipient for a notification like Caller, Assigned To etc.

There are certain scenarios which may present a challenge while configuring this,e.g Notification to multiple users(single or multi-language). I will update this post if any solution is matched.

UPDATE: Multiple users notification implementation. Multilingual Notifications - Multiple Recipients - Now Platform - Article - ServiceNow Community

Happy Holidays Everyone image

View original source

https://www.servicenow.com/community/now-platform-articles/multilingual-notifications-now-made-easy/ta-p/2307887