How to get the translated states and stages in choice list table for notifications
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-03-2024 09:37 PM
What is the best approach to get the translated states and stages from the choice list table and use it on the notifcations.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-03-2024 09:42 PM
Hello @lawrencesenpai
Enable language debugger to find which table they fall under.
find more about translation tables here:
Please mark this answer as helpful and correct if helped
Kind Regards,
Ravi Chandra.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-03-2024 11:16 PM
I use this to translate the labels for the notifcations so it will be translated to the preferred language of the user. However on the notifcations, if I use this ${priority} it still gives the english one instead of the translated in the choice list. So do I need to create a new notifcation script and use that instead? Thanks!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-03-2024 11:05 PM
@lawrencesenpai You can use getDisplayValueLang method available in GlideElement class to get a translated choice from table.
Here is the description of this method.
Here is the example.
var uiView = new GlideRecord("sys_ui_view");
uiView.get("fa776f6d97700100f309124eda2975bc");
gs.info("getDisplayValueLang: " + uiView.getElement("title").getDisplayValueLang("de")); //Display value in German
Please refer to this link for more information https://developer.servicenow.com/dev.do#!/reference/api/vancouver/server_legacy/c_GlideElementAPI#GE...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-03-2024 11:12 PM
So if I use this one, I need to create a notification script and use it on the notifcations instead of the normal {$State} code?