- 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-12-2020 03:18 PM
Thank you so much for explaining all of this Mark. I guess we're still confused about the differences between gs.getMessage vs. gs.getMessageLang. We're happy to use gs.getMessageLang since it's working, but what exactly does gs.getMessage do? Does it translate at all? From all the documentation we've read, it seems like it should translate everything according to a user's preferred language, but we have yet to see it translate anything. Can you help provide some clarity on gs.getMessage? Thanks again.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-12-2020 10:02 PM
gs.getMessage works 100%. If there's a matching UI Message (key and language), that UI Message will be applied.
gs.getMessage is also the most common way, gs.getMessageLang isn't used that much. gs.getMessage with Virtual Agent also does not need so much work, while gs.getMessageLang does need a lot of work to get applied.
It's just that you are trying to switch the users language scripted which not works correctly.
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-13-2020 06:35 AM
Hi
To test, I took away everything except for our Greeting:
Then, I switched my preferred language directly on the sys_user table:
I changed gs.getMessageLang back to gs.getMessage for our Greeting code:
return gs.getMessage('Hello, {0}', [vaInputs.user.first_name]);
However, when we preview it, it still shows Hello, David and not Hola: David
I made sure the following plugins are installed:
Are we missing something that would prevent gs.getMessage from working?

- 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-13-2020 07:48 AM
oh man....that did it! So gs.getMessage goes off of the language selection there and not on sys_user. Thanks so much for this clarification!