Switch between languages(english and french) in Rasa Platform

Hi all. I’m trying to enable the user to choose his preferred language for the conversation while chatting. However, as in the config.yml, we have a predefined language, I wonder how can I achieve this ? A basic conversation flow is : Bot: Which language do you prefer ?(French or english) User : French After this reply the bot should start the conversation in French. Bot : OK. j’ai compris.

Thanks in advance for your reply. Your faithfully.

Hello @Rogers_ntr ,

You could set a slot and then that slot would determine which story it would follow.
You can check it out here on how to make slots influence stories: Slots

Then you can create stories like:

* greet{"language": "en"}
  - utter_greet_en

* greet{"language": "fr"}
  - utter_greet_fr

Or another option would be to create a custom action that reads the language slot value and returns the respective data based on the intent and slot value.

Hope that helps.

Actually, that is what I finally did. I was wondering if there is another way to do it. Also I added in config.yml, language: en,fr to test. Thanks anyway @lahsuk

Mr NENGWE hello your test worked? please answer I am Cameroonian like you and I too am at FGI it will help me for my end of study project