Detect every intent's language

Hello community,

Is it possible to detect the language of every intent the user provides, and whenever a foreign language is detected, an automatic answer like “Sorry, I only speak english.” is sent, otherwise if the detected language is english, the conversation respects the stories given in

I’ve thought about using a custom action, use a library to detect the language, but I don’t know what to do next :

If language != “en” :

  #Here I would send a message

  dispatcher.utter_message(text="Sorry I only speak english")

  #But what next ? How to stop the conversation ?

else : 

  #What should I do here ?

Thanks a lot in advance.

1 Like

Anyone please ?

Hey, did you find any answer to this?

Hi Shiza, I actually didn’t sorry :slightly_frowning_face: Let me know if you find anything !