Changing language with a script node

I would like to know if there is a way to switch the chatbot language using a script node, or through some other way within the chatbot.

Ideally, the flow should be:

  1. chatbot enters the “Switch to English”/“Switch to …” task through utterance in a dialog task
  2. within the task the language is changed (setting context.currentLanguage = “en” within a script node does not seem to be working)
  3. chat is restarted / the welcome message is repeated in the correct language/the chatbot is redirected to the onConnect Dialog Task in the switched language/

Hello @aljaz ,

Welcome to Kore Community :clap:

We have a way to achieve this through Botkit. Checkout the following post to help answer your question

You can also use cheat language <*language name or code*> for a set condition in botkit to achieve this usecase.

I would like to note however that with the help of Kore.ai’s hybrid approach to Natural Language Processing, there will not be any need to switch languages. We recommend you go over the feature details explained here: https://developer.kore.ai/docs/bots/advanced-topics/multi-lingual/building-multi-language-bots/

Hope this helps! Thank you for stopping by!!