Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Translator exception #42

Copy link
Copy link
@ReverendThing

Description

@ReverendThing
Issue body actions

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:

  1. Use the following as a translation function:
       static public async Task<TextResult> TranslateText(string originalText)
        {
            return await translator.TranslateTextAsync(originalText, LanguageCode.Norwegian, LanguageCode.English);
        }
  1. Call the translation function as follows:
    TextResult t= TranslateText(speech.OriginalText).Result;

  2. 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.

Reactions are currently unavailable

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.