How to translate "Scripted Response" in Virtual Agent?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-10-2022 07:25 PM
Dear all,
I am following the doc. to translate for Virtual Agent:
https://community.servicenow.com/community?id=community_article&sys_id=e134c27c1b773c50b09633f2cd4bcbde
But I found that it doesn't work for "Scripted Response" (in Virtual Agent -> Languages -> Translations, it doesn't show "Scripted Response" so I can't edit (translate) it).
How can I translate the script response?
- Labels:
-
Virtual Agent
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-11-2022 07:31 PM
Hi Junyu,
Once you set the preferred language in the portal or Native UI, VA can detect your preferred language and convert the message accordingly.
vaContext.getRequesterLang() - This detects your pref langu that you have chosen,
gs.getMessageLang() - Converts the message to your pref lang
(function execute() {
var tmp = vaInputs.fourth_choice_decision3.getDisplayValue()
return gs.getMessageLang('We only have: \"{0}\" as your next decision, please click \"Yes\" to continue.', vaContext.getRequesterLang(), [tmp]);
})()
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-11-2022 07:38 PM
Hi Murali,
Thanks for your reply, no errors have been generated so far.
Next step I want it to be able to translate according to the preferred language, what should I do?
By the way, can you show me where is the "VA Web Client" for debug?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-11-2022 08:47 PM
Try this:
var language = vaContext.getRequesterLang();
If my answer helped you in any way, please then mark it as helpful.
Kind regards,
Mark
2020-2022 ServiceNow Community MVP
2020-2022 ServiceNow Developer MVP
---
Kind regards,
Mark Roethof
Independent ServiceNow Consultant
10x ServiceNow MVP
---
~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-11-2022 08:54 PM
Hi
Thanks for your reply, no errors have been generated so far.
Next step I want it to be able to translate according to the preferred language, what should I do?
By the way, can you show me where is the "VA Web Client" for debug?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-11-2022 09:06 PM
Do you mean the debug when testing a topic?
If my answer helped you in any way, please then mark it as helpful.
Kind regards,
Mark
2020-2022 ServiceNow Community MVP
2020-2022 ServiceNow Developer MVP
---
LinkedIn
Community article, blog, video list
Kind regards,
Mark Roethof
Independent ServiceNow Consultant
10x ServiceNow MVP
---
~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field
