(Static) Multi-lingual notification support
Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field
Hi there,
Working on multi-language instances, a common request is sending emails in various languages. Out-of-the-box, ServiceNow does not support this. I have created solutions for customers in the past to mimic this, though it always felt like a huge gap within ServiceNow. It used to... with the Tokyo release "Multi-lingual notification support" is introduced!
Let's give it a try.
Pre-Tokyo
Setting up notifications in various languages, you could see several "solutions" out there. For example:- Adding a condition to the Notification, validating the language of the email sender. Easy to set up and for some customers this would work fine. Though what if the senders language setting is not the same as the receivers language setting?- Scripting the subject and message body, using gs.getMessageLang() to translate all text to match the receivers language setting. This works fine, though will require all text to be added as UI Messages. Also... this only works for one receiver, not when working with a watch list or a group which contains receivers with different language settings.- Creating separate events for all receivers of the Notification, to be able to validate the individual receivers language settings and send the Notification in the correct language. Works well, though the customizations needed for these are way too much.
Tokyo
During the TechNow episode regarding the Tokyo release, static multi-lingual notification support was covered. In theory you would have your normal Notification record, and add a "Translated Notification" record [sys_translated_notification] for each language you are after. While a Notification record is used as example here, this works the same on Email Templates and Email Layouts.
Activating static multi-lingual notification support
There are some steps you need to take before the static multi-lingual notification support is available to use.
1. Install (free) plugin "Glide Notification Translation" [com.glide.notification.translation]
2. Add System Property "glide.email.outbound.static_translation.enabled", and give it value "true"
After having performed these two steps, the "Translated Notifications" related list should be available on Notifications... when viewing the Advanced view!
Translated Notifications
Let's set up a test Notification, and assuming the default value should be English. From the related list Translated Notifications, add a new Translated Notification record and select the language you are after, adding a Subject and Message HTML. The result could look something like below:
To be able to test this Notification, I added some simple conditions so the Notification would trigger easily when updating an Incident. Also I made sure that multiple users were added to the Incidents watch list. Users with the default system language setting (English), and users with a Dutch language setting.
Emails
After simulating the Notification trigger conditions on the Incident, an Email record [sys_email] will be generated. At first sight, you might think it's not working. Only the Notification in the English language is shown... Though when opening the Email record, notice the "Email Log" related list:
For the Notification, actually two Translated emails have been generated, one for English, one for Dutch! I did verify the actual emails which were sent, works like a charm
.
Recap
It took ServiceNow a while, though sending emails in various languages is now out-of-the-box available. And good to know, it works fine when also working with a watch list or groups as receivers.
---
And that's it. Hope you like it. If any questions or remarks, let me know!
Kind regards,
Mark Roethof
Independent ServiceNow Consultant
3x ServiceNow Developer MVP
3x ServiceNow Community MVP
---
https://www.servicenow.com/community/international-localization/static-multi-lingual-notification-support/ta-p/2304367
