The CreatorCon Call for Content is officially open! Get started here.

Translate Unsubscribe link

Dale Stubblefie
Giga Contributor

I'm setting up internationalization and noticed that the system does not automatically translate the "Unsubscribe | Notification Preferences" at the bottom of email notifications. 

I see these are macros in the email layout named "Unsubscribe and Preferences", but the macros do not appear to be accessible or editable anywhere in the system.

I could potentially write my own code to generate the links, but they appear to have some custom data in them that I am not sure where to get or generate. 

Example

Unsubscribe:{"id":"2d9b4f23c6112284014937e2ad96b533","token":"c797e62132"}

Is anyone aware of a way to translate these links?  They are not translated OOTB so my international users just see the links in English. 

 

1 REPLY 1

Dale Stubblefie
Giga Contributor

I figured this out using this documentation page: https://docs.servicenow.com/bundle/jakarta-servicenow-platform/page/administer/notification/concept/...

 

If you are in a mail script, you can add a variable in the "link_text" that contains the translated string. 

template.print('<br></br>${NOTIF_UNSUB+link_text="'+unsubscribe+'"} | ${NOTIF_PREFS+link_text="'+preferences+'"}');