Translate French to English Text with Deep Learning AI in C#
You can take advantage of our Deep Learning NLP API to translate French text into English text easily with a free-tier account on the Cloudmersive website. Code is available on our API Console page to connect in 13 different programming languages. Check out how to use C# to connect.
To begin — if you don’t currently have a Cloudmersive API key, head to our website (www.cloudmersive.com) and create a free account (with zero financial commitments whatsoever) to receive a key and 800 API calls per month. Then, follow the steps below.
For the .NET crowd, kick things off by copying the below:
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 using .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, wrap up using the below code, and make sure to include your API key and input text for translation where indicated:
namespace Example
{
public class LanguageTranslationTranslateFraToEngExample
{
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 requesttry
{
// Translate French to English text with Deep Learning AI
LanguageTranslationResponse result = apiInstance.LanguageTranslationTranslateFraToEng(input);
Debug.WriteLine(result);
}
catch (Exception e)
{
Debug.Print("Exception when calling LanguageTranslationApi.LanguageTranslationTranslateFraToEng: " + e.Message );
}
}
}
}