Push notifications translation

michal_v
Giga Contributor

Hey all,

Did any one ever implemented translation for push notifications?

Meaning that the push notification will display in the language that is set in the receiver profile (on the user preferences)

Thanks in advance

6 REPLIES 6

karthikaanbazag
ServiceNow Employee
ServiceNow Employee

Tschewski
Giga Contributor

Hi guys,

this topic is now two years in the past. Currently I have a similar requirement with the new mobile app and agent app to translate push messages for the user.

 

But what I found out is that the mesage field is only a string. So Javascript or gs.getMessage(), getMessage() doesn't work.

 

Does anyone have a solution for this to translate the push message? NOT normal the notification!

We currently have only two languages, but it can't be the right way to create two versions of every push message and check the user preference before sending.

 

So, I hope someone knows it better than me 🙂

 

Regards,
Dominique

 

find_real_file.png

Charles33
Tera Contributor

Is that Message field used still? 

I see now there's a field called "Push Message Content".  I'm not sure it was there before. 

find_real_file.png

 

That "Push Message Content" field refers to a record that generates message via script.  That script can contain the gs.getMessage call such as 

description.Label=gs.getMessage('New comment posted for {0}',[description.Label]);

So I don't know if the Message field shown above is still used or not.  Does anyone know?

 

We need to translate the Push Messages into custom languages (e.g. Greek).  The hard part is finding each push notification that is enabled, finding its related Push Message, and then looking into each script to find any key used in gs.getMessage.  

Hi,

Not sure if it's still worth it for you, but I found you can use mail scripts as a Message to display in this Push Notification.

So you can create a mail_script where you can use gs.getMessage and send your translated message as you wish.

 

Hope it helps.