- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-06-2020 02:10 PM
Hi Experts, our team is completely new to Virtual Agent and have a few questions regarding localization. One of the first questions we want our Virtual Agent to ask is for the user to select their preferred language. From there we have a Decision Utility that splits off into all the languages we want to incorporate. Once a user selects Spanish for example, we would like all of the subsequent questions and selections to translate to Spanish. To test this, we currently have a Bot Response - Script Output that looks like this:
In the Messages table, we created the following entry:
When previewing and choosing Spanish, the Virtual Agent still responds in English:
Are we missing any steps to have this return "Hola David!" instead? Additionally, if we wanted all subsequent questions to be in Spanish, what steps would we need to take to achieve this? If one of the languages we want to incorporate is not available as a plugin, is it possible to translate as well?
Any guidance on this is greatly appreciated.
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-13-2020 07:19 AM
Can you try changing the language under the user settings? Instead of the preferred language field on the user record?
If my answer helped you in any way, please then mark it as helpful.
Kind regards,
Mark
2020 ServiceNow Community MVP
2020 ServiceNow Developer MVP
---
LinkedIn
Community article list
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
08-08-2020 08:13 AM
Hi There,
To get the translation in Spanish, the user should have set the language to Spanish.
to know the language of the user try this - gs.getSession().getLanguage()
Try to use this translation instead,
return gs.getMessage('hi there {0}')+vaInputs.user.first_name;
Also for translation of topics there plugins are needed - com.glide.i18 and Language plugins
Thanks

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-08-2020 09:58 AM
Hi there,
What is the why of wanting to work this way? Have you thought of just using the I18N plugins?
Concerning your first image, which shows the scripted message. You could do this, though easier: just using the Input field and adding a data pill. This way you don't need to script anything. Also the script Murali mentioned, really unnecessary. You can just do this with the input field typing your message, and dragging a data pill in between.
If you really want to go for your requirement, asking which language, and then working in that specific language. Is possible, though you would need to script every message! Also be aware, your messages might be translated then, though the rest of the Virtual Agent web client won't be translated.
How you can achieve this: instead of gs.getMessage(), applying gs.getMessageLang().
If my answer helped you in any way, please then mark it as helpful.
Kind regards,
Mark
2020 ServiceNow Community MVP
2020 ServiceNow Developer MVP
---
LinkedIn
Community article list
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
08-09-2020 09:52 PM
Hi there,
Did this solve your question? Or do we need to follow-up on this?
Please mark this answer as correct if it solves your question. This will help others who are looking for a similar solution. Also marking this answer as correct takes the post of the unsolved list.
Thanks.
Kind regards,
Mark
2020 ServiceNow Community MVP
2020 ServiceNow Developer MVP
---
LinkedIn
Community article list
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
08-10-2020 07:13 AM
Hey
If that's the case, then having VA ask what their preferred language is as the first question seems pointless.
For languages that do not have a pluging (e.g. Arabic), how would VA work?
Thanks!