- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-09-2016 03:21 AM
Hi Guys,
I'm having my first go at an instance with multiple languages set up and having an issue with gs.getMessage() returning only English messages in notifications even though I have translated messages. I have tried logging in selecting other language and having other language set on a user record but still all I see is English messages.
Below are my translated messages.
Email script name: (chubb_message)
var msg=gs.getMessage('chubb_message');
email.setSubject(msg);
Notification: Message HTML field
Please any one suggest me on this?
Any help would be much appreciated!!
Regards,
NJ
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-09-2016 05:12 AM
Short answer: The notification processing is happening in the background as the system account. It doesn't know what language the user is unless you tell it. If you are triggering the notifications from events, you can pass one of the parameters and then use that to get the proper message.
The approach I have used in multi-lingual is less elegant, but never failed. I trigger notifications from an event (ex: gs.eventQueue('my.notification', current, '', ''))
Then I have a notification for each language and a condition that checks the recipient's language. For example, if the message is going to the incident caller. These all respond to the same event trigger, but only the one matching the proper conditions gets sent.
Notification: Incident commented - EN
Condition: Caller.Language | is | English
(English subject and body)
Notification: Incident commented - FR
Condition: Caller.Language | is | French
(French subject and body)
and so on...
http://wiki.servicenow.com/index.php?title=Events_and_Email_Notification
Email Notifications - ServiceNow Wiki
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-09-2016 03:34 AM
Try: var msg = '${gs.getMessage('chubb_message')}';
As per http://wiki.servicenow.com/index.php?title=GlideSystem#getMessage.28String.2C_Object.29&gsc.tab=0
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-09-2016 03:45 AM
Hi Ben-sheffer,
I tried that but no luck still I am getting English messages.
Any Idea?
Regards,
NJ
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-09-2016 04:02 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-09-2016 05:00 AM
Sorry Ben that does not helps me.
Do we have any other way to do it?
Regards,
NJ