logo

NJP

Real Time Language Switcher in Virtual Agent

Import · Feb 07, 2022 · article

Prior to the release of Version San Diego, Virtual Agent (VAs) offered a static language experience. Users interacted with the VA in the language designated within their profile, and there was no option to dynamically switch languages during a conversation.

With the introduction of San Diego, a new feature known as "dynamic translation" empowers VAs to deliver a more multilingual customer experience. This functionality enables users to seamlessly switch between languages during VA interactions.

Plugins to Activate:

1. com.glide.cs.runtime_language_detection_translation

2. com.glide.dynamic_translation

Real time detection

Activating the plugin introduces a new topic called: Runtime Language Detection. This feature resides alongside the user's input text area and analyzes the entered text in real-time. Based on the detected language, the plugin can then suggest a language switch to the user.

image

Once yes is selected, then language switch will take immediate effect.

image

Note: Make sure sn_dt_translator_configuration has a default detection flow. None of the detection will be active when the plugins are activated.

New variables in Virtual Agent

This new feature make way for new variable namely - global_requester_session_language

This can be used as -

vaVars.global_requester_session_language

Show languages available

This opens way for users to select language when opening a conversation, we can prompt users to select the languages available to choose.

image

Now picking the language manually makes switch to that language. In the script update the variable with the language code. In this case I have updated as vaVars.global_requester_session_language = vaInputs.lang. "de" will be the input value from select box below.

image

The conversation is switched to German from here.

image

Thank You!

Murali

View original source

https://www.servicenow.com/community/virtual-agent-nlu-articles/real-time-language-switcher-in-virtual-agent/ta-p/2309766