How to translate Notification Email Scripts

Kasia5
Tera Contributor

Hi All,

I've translated the body of the notification but I have an issue that Notification Email Script parts are not translated, means these checked as yellow below:

Kasia5_0-1738327244184.png

button is ${mail_script:incident_link}

,,About the Inicdent..." is ${mail_script:incident_details}

 

How can I translate it to different language in this case German?

I use only static translation.

 

Thanks in advance for help

4 REPLIES 4

Ankur Bawiskar
Tera Patron
Tera Patron

@Kasia5 

you will have to store them in messages and then use gs.getMessage()

Translate text in Email script 

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

@Kasia5 

Hope you are doing good.

Did my reply answer your question?

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Viraj Hudlikar
Tera Sage

@Kasia5 

For you best will be using gs.getMessage(string,'key') method to translate the string from email script.


Also, check below thread which will help you:
Solved: Translate the Title Text of URL in email script - ServiceNow Community

 

If my response has helped you hit helpful button and if your concern is solved do mark my response as correct.

Thanks & Regards
Viraj Hudlikar.

Johannes Grosb_
Tera Contributor

I am guessing Kasia5 are using Static Translation with Email Scripts. getMessage() will return system default language, because the Notification is first translated by black mag1c, not available for us commons world.

 

To my best knowledge, this is not supported by ServiceNow. I have not yet found a good solution - other than not printing text in Email Scripts is a no go when using Statics translation.

 

If you have a solution for this, please let me know.