Help with translations of message feed in worknotes.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-22-2025 08:24 AM - edited 03-22-2025 08:25 AM
Hi Everyone,
I have special requirement where I will be getting language code in JSON format from third party application with other parameters. I will be sending this code to script include, where based on this language code I need to do translation.
String to be translated - Assist remote visual support session was started by {{user}} at {{time}} on {{date}} and ended at {{time}}.
Based on language code in JSON payload, I need to do glide record to below custom table based on two parameters (key and language) and get the value of "Pair" in script include. And after getting the value of pair, I have to put other parameters value like user, time and date in Pair (translated string) and paste that into work notes of incident.
How can I approach this method so I can get translated string from table and put values of other parameters in that string and paste in work notes
In table I have put example of only one string and only 3 languages. Whereas I have multiple strings to be translated in multiple languages (10).
Please explain can I use passthrough parameter in ServiceNow?
We will create custom table called - "SNOW translations"
Key | Pair | Language |
Assist remote visual support session was started by {{user}} at {{time}} on {{date}} and ended at {{time}}.
| Assist remote visual support session was started by {{user}} at {{time}} on {{date}} and ended at {{time}}.
| en |
Assist remote visual support session was started by {{user}} at {{time}} on {{date}} and ended at {{time}}.
| Assist リモート ビジュアル サポート セッションは {{user}} によって {{date}} の {{time}} に開始され、{{time}} に終了しました。 | jp |
Assist remote visual support session was started by {{user}} at {{time}} on {{date}} and ended at {{time}}. | La sessione di supporto visivo remoto è stata avviata da {{user}} alle {{time}} del {{date}} ed è terminata alle {{time}}. | it |
JSON Payload:
{"lang":"jp",
"user":"John",
"time":"12:34:56 GMT",
"date":"21-03-2025",
"incident_id":"b39069e11b3f521017fc8595624bcb78"
}
Please help me with this approach.
Thanks in advance
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-22-2025 06:44 PM
Hello @Abhijit Das7
Please create key value pairs in "sys_ui_message" table. And then for these values store translations in "sys_transalated_text" in all the 10 languages. This is the recommended method. We have used this, not for this exact requirement but a little different one and it will work.
Kindly mark my answer as helpful and accept solution if it helped you in anyway. This will help me be recognized for the efforts and also move this questions from unsolved to solved bucket.
Regards,
Shivalika
My LinkedIn - https://www.linkedin.com/in/shivalika-gupta-540346194
My youtube - https://youtube.com/playlist?list=PLsHuNzTdkE5Cn4PyS7HdV0Vg8JsfdgQlA&si=0WynLcOwNeEISQCY
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-23-2025 12:28 PM
Hello @Abhijit Das7
Please confirm if you checked my answer. Kindly mark my answer as helpful and accept solution if it helped you in anyway. This will help me be recognized for my efforts and also it can move from unsolved bucket to solved bucket.
Regards,
Shivalika
My LinkedIn - https://www.linkedin.com/in/shivalika-gupta-540346194
My youtube - https://youtube.com/playlist?list=PLsHuNzTdkE5Cn4PyS7HdV0Vg8JsfdgQlA&si=0WynLcOwNeE