Open
Description
If I use the example code given in the readme then I get an error that the language code "en" is deprecated and to use "en-GB" instead, however, if I try and change to this then my program hangs indefinitely.
Steps to reproduce the behavior:
- Use the following as a translation function:
static public async Task<TextResult> TranslateText(string originalText)
{
return await translator.TranslateTextAsync(originalText, LanguageCode.Norwegian, LanguageCode.English);
}
-
Call the translation function as follows:
TextResult t= TranslateText(speech.OriginalText).Result;
-
Receive error "One or more errors occurred. (targetLanguageCode="en" is deprecated, please use "en-GB" or "en-US" instead)"
I have tried changing my translation function as follows:
return await translator.TranslateTextAsync(originalText, LanguageCode.Norwegian, "en-GB");
And this causes the program to hang indefinitely.