Cross-lingual Bot with Bert-LaBSE - how to provide detected language to NLG?

we are using the Bert-LaBSE model in Rasa and made very good experiences with the intent recognition with many different languages of user input.

Now we want to generate the response in the language the user asked the original question. How can we do that?

Is there a way to provide the recognized language within the NLU part from Bert-LaBSE model?

We would like to use a realtime translation service (like DeepL) to provide the (German) original response combined with the detected language and get the translated bot response.

Thanks for support,

Rainer

Have you considered passing the language from the front end (browser, mobile app?) as metadata at the beginning of the conversation? You could pick up the language in action_session_start and set a language slot that would be available to the NLG.

good point - I will check that! thank you! Rainer