Problem with the C# code example ("SampleCode_CSharp_SDLMTCloud.zip") for automated translation using C# programming

Hello, Support,

I have a problem with the C# code example ("SampleCode_CSharp_SDLMTCloud.zip") for automated translation using C# programming.

Source:
<https://languageweaver.exavault.com/share/view/1x830-awnyfmm6>

The connection to SDLMTCloud is missing.
The error message is: "At least one error has occurred." (InnerException = {"Error sending the request."})

Manual access via <https://translate.sdl.com/login> works.
I used the same access data in the C# program.

What am I doing wrong?

With kind regards
Oliver

  • Hi Oliver,

    Did you modify the program.cs and added the appropriate login information to MT Cloud?

    It is hard to guess what is wrong there, but I would start by reviewing the login information provided. Do you have any additional information that would help understanding what the issue with the code might be? What modifications did you perform to the code sample?

    Thanks

  • Hello Arnaud,

    I have only changed the appropriate credentials for the MT Cloud in the example program.

    At this point in the program:

    translator = new SDLMTCloudTranslator(
        "https://translate-api.sdlbeglobal.com", // server
        "user@company.com",                         // user
        "myPassword",                                     // password
        "eng",                                                   // source language
        "ger",                                                    // target language
        "generic",                                             // model
        false      // useClientAuthentication
    );


    I have used the same login data as for manual login.

    Greeting

    Oliver