Translate German to English Text with Deep learning AI in C#

If you’re dealing with both German and English text in your current application/project, take advantage of our NLP API and make translations easy. Connect in C# using ready-to-run code examples from the Cloudmersive API Console.

Use the below to install the .NET SDK:

Install-Package Cloudmersive.APIClient.NET.NLP -Version 4.1.0using System;
using System.Diagnostics;
using Cloudmersive.APIClient.NET.NLP.Api;
using Cloudmersive.APIClient.NET.NLP.Client;
using Cloudmersive.APIClient.NET.NLP.Model;

If you’re working in .NET Core, use this instead:

Install-Package Cloudmersive.APIClient.NETCore.NLP -Version 2.1.3using System;
using System.Diagnostics;
using Cloudmersive.APIClient.NETCore.NLP.Api;
using Cloudmersive.APIClient.NETCore.NLP.Client;
using Cloudmersive.APIClient.NETCore.NLP.Model;

After that, copy the remaining code below. Ensure you enter in your Cloudmersive API key where indicated (and if you don’t have a key, head to the Cloudmersive website and create a free account with zero commitments to receive one).

namespace Example
{
public class LanguageTranslationTranslateDeuToEngExample
{
public void main()
{
// Configure API key authorization: Apikey
Configuration.Default.AddApiKey("Apikey", "YOUR_API_KEY");
var apiInstance = new LanguageTranslationApi();
var input = new LanguageTranslationRequest(); // LanguageTranslationRequest | Input translation request
try
{
// Translate German to English text with Deep Learning AI
LanguageTranslationResponse result = apiInstance.LanguageTranslationTranslateDeuToEng(input);
Debug.WriteLine(result);
}
catch (Exception e)
{
Debug.Print("Exception when calling LanguageTranslationApi.LanguageTranslationTranslateDeuToEng: " + e.Message );
}
}
}
}

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store