Search code examples
c#azurebotframeworktranslation

Is it possible to translate Adaptive Cards within the Web App Bot?


i am working on a bot via the Bot Framework 4.0 and at the moment im implementing text-based Adaptive Cards. The bot can translate any text languages from the user with the Azure Translation API.

Link to the Translation API: https://azure.microsoft.com/en-us/services/cognitive-services/translator/

My question is if it is possible to translate outcoming Adaptive Cards via the Translation API or if not, if there is a possible solution to this problem.


Solution

  • It is possible, though not automatic. Translating cards is tricky because you can't just translate every string in the card. You need to know which strings to translate and which ones to not translate. I've created a library that does this, and you can read about it here.