GroupDocs.Translation-Cloud 24.11.1

dotnet add package GroupDocs.Translation-Cloud --version 24.11.1                
NuGet\Install-Package GroupDocs.Translation-Cloud -Version 24.11.1                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="GroupDocs.Translation-Cloud" Version="24.11.1" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add GroupDocs.Translation-Cloud --version 24.11.1                
#r "nuget: GroupDocs.Translation-Cloud, 24.11.1"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install GroupDocs.Translation-Cloud as a Cake Addin
#addin nuget:?package=GroupDocs.Translation-Cloud&version=24.11.1

// Install GroupDocs.Translation-Cloud as a Cake Tool
#tool nuget:?package=GroupDocs.Translation-Cloud&version=24.11.1                

.NET SDK for Translating Cloud Documents

alternate text is missing from this package README image Nuget Nuget GitHub license

Product Page | Docs | Demos | Swagger UI | Examples | Blog | Search | Free Support | Free Trial

GroupDocs.Translation Cloud is Cloud API to translate Word (including RTF and TXT files), Excel (including CSV / TSV files), PowerPoint, PDF, HTML, Markdown (including Markdown with Hugo syntax), OpenDocument, RESX, SRT files, images of JPG, PNG, SVG, BMP and GIF formats, scanned PDFs audio and video files as well as plain text.

For convenience of our .NET customers, we introduce a simple SDK that assists to add translation of all document, image and media file formats mentioned above and plain text to your app with merely a few lines of code.

In detail, it's a set of SDKs for document and plain text translation in our Cloud. It supports translation of .doc, .docx, .docm, .xls, .xlsx, .xlsm, .ppt, .pptx, .pptm, .pdf, .html, .md, .odt, .ods, .odp, .csv, .tsv, .rtf, .txt, .resx, .srt, .png, .jpg, .svg, .bmp and .gif files. Just pass a specific file or text to the GroupDocs.Translation Cloud API, and it will translate and save translated file in S3 or will return translated text.

It is easy to get started with GroupDocs.Translation Cloud and there is nothing to install. Create an account at GroupDocs Cloud and get your application information, then you are ready to use SDKs.

Cloud Document Translation Features

  • Translation of Microsoft Word®, Microsoft Excel®, and Microsoft PowerPoint® documents
  • 46 languages and 140 languages pairs support
  • Translation of tables, headers, footers, footnotes/endnotes, image captions in Word documents and ODT files
  • Translation of cells, charts, tables, pivot tables in Excel documents and ODS files
  • Translation of text frames, tables, headers, footers, charts, comments in PowerPoint presentations and ODP files
  • Translation of PDF files
  • Translation of Markdown files
  • Translation of Hugo syntax in Markdown files
  • Translation of plain text
  • Translation of .NET resources of RESX format
  • Translation of subtitles in SRT format
  • Translation of images and scanned PDFs getting plain text or PDF as a result
  • Translation of scanned tables getting Excel workbook as a result
  • Translation of handwritten text
  • Translation of audio files, including translation by providing a link
  • Translation of video files, including translation by providing a link

Supported Translation Formats

You shoukd specify format of document to translate putting in the request’s body the appropriate enum value.

Additionally, user could obtain translated file in any other format available for conversion. Just specify output format of translated document by putting file extension in the request’s body:

  • doc, docx, odt, rtf — docx, rtf, html, odt, txt, md, pdf, tiff, svg, xps
  • xls, xlsx, ods, csv, tsv — xlsx, xlsb, html, pdf, xps, ods, md, docx, pptx, tiff
  • ppt, pptx, odp — pptx, pdf, tiff, html, xps, odp
  • pdf — docx, pptx, html, svg, xps
  • md — html, pdf, docx, tiff, xps
  • html — md, pdf, docx, tiff, xps

Please visit Supported Formats for details.

Supported Translation Languages

  • en-fr / fr-en — to translate from English to French or from French to English.
  • en-de / de-en — to translate from English to German or from German to English.
  • en-es / es-en — to translate from English to Spanish or from Spanish to English.
  • en-it / it-en — to translate from English to Italian or from Italian to English.
  • en-zh / zh-en — to translate from English to Chinese or from Chinese to English.
  • en-ru / ru-en — to translate from English to Russian or from Russian to English
  • en-ar / ar-en — to translate from English to Arabic or from Arabic to English
  • en-pt / pt-en — to translate from English to Portuguese or from Portuguese to English
  • en-pl / pl-en — to translate from English to Polish or from Polish to English
  • en-uk / uk-en — to translate from English to Ukrainian or from Ukrainian to English
  • en-vi / vi-en — to translate from English to Vietnamese or from Vietnamese to English
  • en-id / id-en — to translate from English to Indonesian or from Indonesian to English
  • en-hi / hi-en — to translate from English to Hindi or from Hindi to English
  • en-el / el-en — to translate from English to Greek or from Greek to English
  • en-nl / nl-en— to translate from English to Dutch or from Dutch to English
  • en-hu / hu-en — to translate from English to Hunngarian or from Hungarian to English
  • en-sv / sv-en — to translate from English to Swedish or from Swedish to English
  • en-tr / tr-en — to translate from English to Turkish or from Turkish to English
  • en-ja / ja-en — to translate from English to Japanese or from Japanese to English
  • en-ko / ko-en — to translate from English to Korean or from Korean to English
  • en-cs / cs-en — to translate from English to Czech or from Czech to English
  • en-fi / fi-en — to translate from English to Finnish or from Finnish to English
  • en-ga / ga-en — to translate from English to Irish or from Irish to English
  • en-fa / fa-en — to translate from English to Farsi or from Farsi to English
  • en-az / az-en — to translate from English to Azerbaijani or from Azerbaijani to English
  • en-he / he-en — to translate from English to Hebrew or from Hebrew to English
  • en-sk / sk-en — to translate from English to Slovak or from Slovak to English
  • en-th / th-en — to translate from English to Thai or from Thai to English
  • en-ro / ro-en — to translate from English to Romanian or from Romanian to English
  • en-ms / ms-en — to translate from English to Malay or from Malay to English
  • en-bg / bg-en — to translate from English to Bulgarian or from Bulgarian to English
  • en-bn / bn-en — to translate from English to Bengali or from Bengali to English
  • en-da / da-en — to translate from English to Danish or from Danish to English
  • en-lt / lt-en — to translate from English to Lithuanian or from Lithuanian to English
  • en-lv / lv-en — to translate from English to Latvian or from Latvian to English
  • en-no / no-en — to translate from English to Norwegian or from Norwegian to English
  • en-et / et-en — to translate from English to Estonian or from Estonian to English
  • en-hy / hy-en — to translate from English to Armenian or from Armenian to English
  • en-ca / ca-en — to translate from English to Catalan or from Catalan to English
  • en-hr / hr-en — to translate from English to Croatian or from Croatian to English
  • en-sr / sr-en — to translate from English to Serbian or from Serbian to English
  • en-af / af-en — to translate from English to Afrikaans or from Afrikaans to English
  • en-ur / ur-en — to translate from English to Urdu or from Urdu to English
  • en-tl / tl-en — to translate from English to Tagalog or from Tagalog to English
  • en-ka / ka-en — to translate from English to Georgian or from Georgian to English
  • fr-de / de-fr — to translate from French to German or from German to French
  • fr-it / it-fr — to translate from French to Italian or from Italian to French
  • fr-ar / ar-fr — to translate from French to Arabic or from Arabic to French
  • fr-es / es-fr — to translate from French to Spanish or from Spanish to French
  • fr-id / id-fr — to translate from French to Indonesian or from Indonesian to French
  • fr-ms / ms-fr — to translate from French to Malay or from Malay to French
  • fr-pl / pl-fr — to translate from French to Polish or from Polish to French
  • fr-ru / ru-fr — to translate from French to Russian or from Russian to French
  • fr-ar / ar-fr — to translate from French to Arabic or from Arabic to French
  • de-it / it-de — to translate from German to Italian or from Italian to German
  • de-pl / pl-de — to translate from German to Polish or from Polish to German
  • de-ar / ar-de — to translate from German to Arabic or from Arabic to German
  • de-zh / zh-de — to translate from German to Chinese or from Chinese to German
  • de-es / es-de — to translate from German to Spanish or from Spanish to German
  • de-ms / ms-de — to translate from German to Malay or from Malay to German
  • de-uk / uk-de — to translate from German to Ukrainian or from Ukrainian to German
  • it-es / es-it — to translate from Italian to Spanish or from Spanish to Italian
  • it-ar / ar-it — to translate from Italian to Arabic or from Arabic to Italian
  • it-uk / uk-it — to translate from Italian to Ukrainian or from Ukrainian to Italian
  • it-ms / ms-it — to translate from Italian to Malay or from Malay to Italian
  • sv-zh / zh-sv — to translate from Swedish to Chinese or from Chinese to Swedish
  • ar-es / es-ar — to translate from Arabic to Spanish or from Spaish to Arabic
  • ar-tr / tr-ar — to translate from Arabic to Turkish or from Turkish to Arabic
  • ar-pl / pl-ar — to translate from Arabic to Polish or from Polish to Arabic
  • ru-es / es-ru — to translate from Russian to Spanish or from Spaish to Russian

JSON Request Details

You can put the following information in the requests body to translate a document:

  • format — format of file for translation
  • outputFormat — format of translated file (e.g. pdf)
  • sourceLanguage — language of original document (e.g. en)
  • targetLanguages — languages of translation as list (e.g. [fr, de])
  • file — file to translate in form of array of bytes
  • url — link to file to translate, either file or url should be provided
  • originalFileName — original name of file to translate, if null or empty request id will be used
  • masters — if masters slides should be translated (only for presentations, pass true or false)
  • elements — slide pages to translate (only for presentations, pass empty list to translate whole presentation)
  • separator — delimiter for CSV files
  • ranges - dictionary of ranges in Excel workbook
  • shortcodedict — dictionary of short code syntax in Hugo to translate, where the key is zero based short code index, and value is a list of parameters names that require translation
  • frontmatterdict — dictionary of front matter syntax in Hugo to translate, where the key is zero based front matter index and value is list of paths to values that require translation, each path is also a list.

To translate plain text the following information should be put in the requests body:

  • sourceLanguage — language of original text (e.g. en)
  • targetLanguages — languages of translation as list (e.g. [fr, de])
  • texts — list of texts to translate (e.g. [hello world])
  • contains-markdown — true if text contains markdown syntax

How to use the SDK?

Our API is completely independent of your operating system, database system, or development language. You can use any language and platform that supports HTTP to interact with our API. However, manually writing client code can be difficult, error-prone, and time-consuming. Therefore, we provide and support SDKs in many development languages to make it easier for your Cloud Apps to integrate with us.

Quickstart

1. Get API keys if you haven't

Make a personal account on GroupDocs Cloud Dashboard and click Get Keys. These keys are useful for all GroupDocs Cloud products. If you have any trouble, look at this detailed manual. Once your keys are received, please follow this article to try GroupDocs.Translation Cloud or familiarize with Developer guide for further details.

2. Run Demo
  • Checkout the SDK
  • Open .NET core demo project
  • Set Your ClientId & ClientSecret
  • Run

Translate plain text

using System.Collections.Generic;
using System.Diagnostics;
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.Extensions;
using GroupDocs.Translation.Cloud.Sdk.Model;
using HttpStatusCode = System.Net.HttpStatusCode;

namespace GroupDocs.Translation.Cloud.Sdk
{
	public class TextTranslator
	{
		public TextTranslator()
		{
			Configuration config = new Configuration();
			/** Authorize your requests to GroupDocs.Translation Cloud */
			config.OAuthFlow = OAuthFlow.APPLICATION;
			config.OAuthClientId = "YOU_CLIENT_ID";
			config.OAuthClientSecret = "YOU_CLIENT_SECRET";
			/** Initialize GroupDocs.Translation API */
			config.BasePath = "https://api.groupdocs.cloud/v2.0/translation";
			TranslationApi apiInstance = new TranslationApi(config);
			/** Specify translation parameters */
			string translateFrom = new List<string>() { "Hello, world! I can read this text in my language." };
			string sourceLanguage = "en";
			var targetLanguages = new List<string>() { "de" };
			var request = new TextRequest(sourceLanguage, targetLanguages, translateFrom, origin: "demo");
			/** Send text to translation */
			StatusResponse translationStatus = apiInstance.TextPost(request);
			/** Wait for results from translation queue */
			if(translationStatus.Status.ToSystemHttpStatusCode() == HttpStatusCode.Accepted)
			{
				while(true)
				{
					var result = apiInstance.TextRequestIdGet(statusResponse.Id);
					if(result.Status.ToSystemHttpStatusCode() == HttpStatusCode.OK)
					{
						Console.WriteLine(result.Translations[toLang].First());
						break;
					}
					Thread.Sleep(1000);
				}
			}
		}
	}
}

Documentation for API Endpoints

All URIs are relative to https://api.groupdocs.cloud/v2.0/translation

Class Method HTTP request Description
TranslationApi autoPost POST /auto Translate any supported file
TranslationApi csvPost POST /csv Translate CSV and TSV files
TranslationApi documentPost POST /document Translate Microsoft Word documents, rtf, txt, odt
TranslationApi documentRequestIdGet GET /document/{requestId} Return document translation status. Also return URLs for downloading of translated document if translation was successful
TranslationApi documentTrialPost POST /document/trial Trial translate Microsoft Word documents, rtf, txt, odt without conversation. Translate only first page or 1000 symbols.
TranslationApi hcGet GET /hc Health check for all services.
TranslationApi htmlPost POST /html Translate HTML files
TranslationApi hugoGet GET /hugo Get hugo syntax structure from markdown file
TranslationApi hugoPost POST /hugo Run hugo syntax structure analyzing from markdown file
TranslationApi imageToFilePost POST /image-to-file Translate image or scanned pdf and return file
TranslationApi imageToTextPost POST /image-to-text Translate text on image or scanned pdf
TranslationApi languagesGet GET /languages Return list of available language pairs
TranslationApi markdownPost POST /markdown Translate Markdown files
TranslationApi pdfPost POST /pdf Translate pdf files
TranslationApi pdfTrialPost POST /pdf/trial Trial pdf translation. Translate only first page without conversion to another format.
TranslationApi presentationPost POST /presentation Translate Microsoft PowerPoint presentations, odp
TranslationApi resxPost POST /resx Translate RESX files
TranslationApi spreadsheetPost POST /spreadsheet Translate Microsoft Excel workbooks, ods
TranslationApi textPost POST /text Translate text
TranslationApi textRequestIdGet GET /text/{requestId} Return text translation status. Also return translated text if translation was successful
TranslationApi textTrialPost POST /text/trial Trial translate text. Translate only 1000 symbols.

Documentation for Models

.NET Java Python Android
GitHub GitHub GitHub GitHub
NuGet Maven PIP Maven

Product Page | Docs | Demos | Swagger UI | Examples | Blog | Search | Free Support | Free Trial

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
.NET Core netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.1 is compatible. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories (1)

Showing the top 1 popular GitHub repositories that depend on GroupDocs.Translation-Cloud:

Repository Stars
aspose-pdf/Aspose.PDF-for-.NET
Aspose.PDF for .NET examples, plugins and showcase projects
Version Downloads Last updated
24.11.1 42 11/26/2024
24.11.0 50 11/25/2024
24.6.0 126 6/3/2024
24.5.0 121 5/26/2024
24.3.0 134 3/22/2024
23.12.0 881 12/22/2023
23.10.5 336 10/26/2023
23.10.1 205 10/18/2023
23.10.0 149 10/18/2023
23.9.4 381 9/27/2023
23.9.3-pre 123 9/11/2023
23.9.0-pre 107 9/6/2023
23.8.3-pre 116 9/1/2023
23.8.2-pre 149 8/25/2023
23.8.0-pre 131 8/9/2023
23.6.1-pre 412 6/30/2023
23.6.0-pre 146 6/30/2023
22.12.0 3,452 12/12/2022
22.11.0 331 11/28/2022
22.8.1 1,711 8/30/2022
22.8.0 541 8/5/2022
22.5.2 509 6/28/2022
22.5.1 424 6/15/2022
22.5.0 466 5/18/2022
22.4.0 459 4/25/2022
22.2.0 459 2/21/2022
21.6.0 6,030 6/25/2021
20.12.1 563 1/14/2021
20.12.0 476 12/21/2020
20.10.0 464 11/3/2020
20.9.0 442 9/23/2020
20.8.0 453 8/31/2020
20.7.0 501 7/17/2020
20.6.0 508 6/23/2020