One service that is used a lot in Bot development is the Microsoft Translation API. One method is especially useful; detect.
In v2 you would make a call like Detect(“Hello”) and it would return “en”. Fine, actually it’s not. If your Bot was speaking in German and the User entered “Ja” then Detect(“Ja”) would return “Finnish” – noooooh. Thankfully v3 now provides us with the alternatives, as you can see here they all have the same score – Hurray 🙂
[ { "language": "fi", "score": 1, "isTranslationSupported": true, "isTransliterationSupported": false, "alternatives": [ { "language": "et", "score": 1, "isTranslationSupported": true, "isTransliterationSupported": false }, { "language": "de", "score": 1, "isTranslationSupported": true, "isTransliterationSupported": false } ] } ]