If so you can download any of the below versions for testing. The product will function as normal except for an evaluation limitation. At the time of purchase we provide a license file via email that will allow the product to work in its full capacity. If you would also like an evaluation license to test without any restrictions for 30 days, please follow the directions provided here.
If you experience errors, when you try to download a file, make sure your network policies (enforced by your company or ISP) allow downloading ZIP and/or MSI files.

Installation
The package is available at nuget.org and it can be installed via the Package Manager Console by executing the following command:
NuGet\Install-Package GroupDocs.Translation-Cloud

Requirements
Quick Start
Get your API credentials
To use GroupDocs.Translation Cloud, sign up at GroupDocs.Cloud Dashboard and get your Client ID and Client Secret.
Initialize the API
Use the following code to start using the GroupDocs.Translation Cloud SDK for .NET.
using GroupDocs.Translation.Cloud.Sdk.Api;
using GroupDocs.Translation.Cloud.Sdk.Client;
using GroupDocs.Translation.Cloud.Sdk.Client.Auth;
var config = new Configuration();
config.OAuthFlow = OAuthFlow.APPLICATION;
config.OAuthClientId = "YourClientId";
config.OAuthClientSecret = "YourClientSecret";
config.BasePath = "https://api.groupdocs.cloud/v2.0/translation";
var apiInstance = new TranslationApi(config);
See Example.cs for more details.
Translate plain text
This example translates an English sentence to German and waits for the result.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Threading;
using GroupDocs.Translation.Cloud.Sdk.Api;
using GroupDocs.Translation.Cloud.Sdk.Client;
using GroupDocs.Translation.Cloud.Sdk.Client.Auth;
using GroupDocs.Translation.Cloud.Sdk.Extensions;
using GroupDocs.Translation.Cloud.Sdk.Model;
var config = new Configuration();
config.OAuthFlow = OAuthFlow.APPLICATION;
config.OAuthClientId = "YourClientId";
config.OAuthClientSecret = "YourClientSecret";
config.BasePath = "https://api.groupdocs.cloud/v2.0/translation";
var apiInstance = new TranslationApi(config);
var textRequest = new TextRequest(
"en",
new List<string> { "de" },
new List<string> { "Hello, world! I can read this text in my language." },
origin: "unit-tests");
var statusResponse = apiInstance.TextPost(textRequest);
if (statusResponse.Status.ToSystemHttpStatusCode() == HttpStatusCode.Accepted)
{
while (true)
{
var result = apiInstance.TextRequestIdGet(statusResponse.Id);
if (result.Status.ToSystemHttpStatusCode() == HttpStatusCode.OK)
{
Console.WriteLine(result.Translations["de"].First());
break;
}
Thread.Sleep(1000);
}
}
See Example.cs for more details.
Translate a Word document
This example uploads a DOCX file, translates it to Spanish, and prints the result URL.
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Threading;
using GroupDocs.Translation.Cloud.Sdk.Api;
using GroupDocs.Translation.Cloud.Sdk.Client;
using GroupDocs.Translation.Cloud.Sdk.Client.Auth;
using GroupDocs.Translation.Cloud.Sdk.Model;
var config = new Configuration();
config.OAuthFlow = OAuthFlow.APPLICATION;
config.OAuthClientId = "YourClientId";
config.OAuthClientSecret = "YourClientSecret";
config.BasePath = "https://api.groupdocs.cloud/v2.0/translation";
var apiInstance = new TranslationApi(config);
var fileApi = new FileApi(config);
var request = new TextDocumentFileRequest("en", new List<string> { "es" }, outputFormat: "docx")
{
Format = TextDocumentFileRequest.FormatEnum.Docx,
Origin = "ApiTest",
PreserveFormatting = true,
SavingMode = TextDocumentFileRequest.SavingModeEnum.Files,
Url = fileApi.FileUploadPostAsync("docx", File.OpenRead("TestWord.docx")).Result
};
var response = apiInstance.DocumentPost(request);
for (var i = 0; i < 60; i++)
{
var result = apiInstance.DocumentRequestIdGet(response.Id);
if (result.Urls.Count > 0)
{
Console.WriteLine(result.Urls.First());
break;
}
Thread.Sleep(1000);
}
See TranslationApiTests.cs for more details.
Get Language Pairs
This example returns the language pairs the translation API supports.
using System;
using GroupDocs.Translation.Cloud.Sdk.Api;
using GroupDocs.Translation.Cloud.Sdk.Client;
using GroupDocs.Translation.Cloud.Sdk.Client.Auth;
var config = new Configuration();
config.OAuthFlow = OAuthFlow.APPLICATION;
config.OAuthClientId = "YourClientId";
config.OAuthClientSecret = "YourClientSecret";
config.BasePath = "https://api.groupdocs.cloud/v2.0/translation";
var apiInstance = new TranslationApi(config);
var response = apiInstance.LanguagesGet();
Console.WriteLine("Language pairs: " + response.Count);
See TranslationApiTests.cs for more details.
Examples on GitHub
The GroupDocs.Translation Cloud .NET SDK repository contains the SDK, a demo project, and the API tests. There is no separate examples repository.
How to run the examples
- Clone or download the SDK repository
- Open the .NET demo project
- Set your Client ID and Client Secret
- Run the demo
For more details, visit Getting Started.
