I have created a chatbot and translated the JSON localization to have a second language, to my language user language interaction is saved in System.User.Language which is a type of choice. I tried to create a question node to begin the chat conversation with the language preferences. Like,
Choose your language preferences1- English
2- Spanish
3- Arabic
And based on user's choice, the conversation will be redirected to Conversation Start with switch to language based on the user's choice.
Is there a way to achieve that?
I went through Microsoft Documentation and all videos on Youtube, they all about Yaaaaay you create an Multi-lingual bot if you download Json localization and translate it, but from Demo website there is no way to test the bot with any language other than English
You could create a question node at the beginning of your Conversation start topic. Set it to a Multiple Choice options and add the languages the users can select, set "Save the user response as" to a variable, I named mine varSelectedLanguage . Like this:
Next add a "set variable value" node and set the variable System.User.Language to the selected language. You can do this with a Power FX formula in the to value field. Click the three dots and select the Formula tab. Put the following Switch function in the "Enter formula" field.
Switch(Text(Topic.varSelectedLanguage),
"English",Locale.English,
"Norwegian",Locale.Norwegian,
Locale.English)
You need to put a line there for every language you have made available for the users. Click insert and then test your bot. It should ask a question now and let the user select their language.
Regards,
Arild
Was this reply helpful?YesNo
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.