<dependency>
    <groupId>com.groupdocs</groupId>
    <artifactId>groupdocs-translation-cloud</artifactId>
    <version>20.10.0</version>
</dependency>
copied!  
compile(group: 'com.groupdocs', name: 'groupdocs-translation-cloud', version: '20.10.0')
copied!  
<dependency org="com.groupdocs" name="groupdocs-translation-cloud" rev="20.10.0">
    <artifact name="groupdocs-translation-cloud" ext="jar"/>
</dependency>
copied!  
libraryDependencies += "com.groupdocs" % "groupdocs-translation-cloud" % "20.10.0"
copied!  

Document Translation Java Cloud REST API

banner

Product Page | Docs | Live Demos | Swagger UI | Code Samples | Blog | Free Support | Free Trial

GroupDocs.Translation Cloud SDK for Java helps you build cloud Document language translation Java Apps that work without installing any 3rd party software. It is a wrapper around GroupDocs.Translation Cloud REST APIs.

Cloud Document Translation SDK Features

  • Supports 70+ language pairs to perform document translation in the cloud.
  • Translate cloud documents via making simple JSON requests.
  • Uses Neural Machine Translation to perform fast and accurate language translation in the cloud.
  • Keeps the cloud document structure & formatting intact during and after the translation.
  • Supports the translation of the following elements in the Microsoft Word® or ODT cloud documents:
    • paragraphs
    • header & footer
    • footnote & endnote
    • image captions
    • tables
  • Supports the translation of the following elements in the Microsoft Excel® or ODS cloud documents:
    • tables
    • pivot tables
    • cells (in case of text)
    • charts
  • Supports the translation of the following elements in the Microsoft PowerPoint® or ODP cloud documents:
    • master slide
    • selected slides
    • slide notes & comments
    • header & footer
    • text frames
    • charts
    • tables
  • Convert translated cloud document to any of the supported output formats.

Supported Document Translation File Formats

Microsoft Word®: DOC, DOCX, DOCM, RTF
OpenOffice Writer®: ODT
Microsoft Excel®: XLS, XLSX, XLSM, CSV, TSV
OpenOffice Calc®: ODS
Microsoft PowerPoint®: PPT, PPTX, PPTM
OpenOffice Impress®: ODP
Fixed Layout: PDF
Other: MD (Markdown)

Supported Cloud Translation Output File Formats

Translated file can be obtained in many other supported file formats. Just specify output format of translated document by putting the file extension in the request s body:

  • DOC, DOCX, ODT, RTF to DOCX, RTF, HTML, ODT, TXT, MD, PDF, TIFF, SVG, XPS
  • XLS, XLSX, ODS, CSV, TSV to XLSX, XLSB, HTML, PDF, XPS, ODS, MD, DOCX, PPTX, TIFF
  • PPT, PPTX, ODP to PPTX, PDF, TIFF, HTML, XPS, ODP
  • PDF to DOCX, PPTX, HTML, XPS, SVG
  • MD to HTML, PDF, DOCX, TIFF, XPS

Please visit Supported Translation Formats for further details.

Supported Languages Translation Pairs

  • Translate English to French & French to English
  • Translate English to German & German to English
  • Translate English to Deutsch & Deutsch to English
  • Translate English to Chinese & Chinese to English
  • Translate English to Spanish & Spanish to English
  • Translate English to Italian & Italian to English
  • Translate English to Russian & Russian to English
  • Translate English to Arabic & Arabic to English
  • Translate English to Portuguese & Portuguese to English
  • Translate English to Polish & Polish to English
  • Translate English to Ukrainian & Ukrainian to English
  • Translate English to Vietnamese & Vietnamese to English
  • Translate English to Indonesian & Indonesian to English
  • Translate English to Hindi & Hindi to English
  • Translate English to Greek & Greek to English
  • Translate English to Dutch & Dutch to English
  • Translate English to Hungarian & Hungarian to English
  • Translate English to Swedish & Swedish to English
  • Translate English to Turkish & Turkish to English
  • Translate English to Japanese & Japanese to English
  • Translate English to Korean & Korean to English
  • Translate English to Czech & Czech to English
  • Translate English to Finnish & Finnish to English
  • Translate English to Irish & Irish to English
  • Translate English to Slovak & Slovak to English
  • Translate English to Farsi & Farsi to English
  • Translate English to Persian & Persian to English
  • Translate English to Hebrew & Hebrew to English
  • Translate English to Azerbaijani & Azerbaijani to English
  • Translate English to Thai & Thai to English
  • Translate English to Romanian & Romanian to English
  • Translate English to Malay & Malay to English
  • Translate English to Bulgarian & Bulgarian to English
  • Translate French to German & German to French
  • Translate French to Deutsch & Deutsch to French
  • Translate French to Italian & Italian to French
  • Translate French to Arabic & Arabic to French

Requirements

Building the API client library requires:

  1. Java 1.7+
  2. Maven

Prerequisites

To use GroupDocs.Translation Cloud SDK for Java you need to register an account with GroupDocs Cloud and lookup/create Client ID and Client Secret at Cloud Dashboard. There is free quota available. For more details, see GroupDocs Cloud Pricing.

Install GroupDocs.Translation-Cloud from Maven

Add GroupDocs Cloud repository to your application pom.xml

<repository>
    <id>repository.groupdocs.cloud</id>
    <name>repository.groupdocs.cloud</name>
    <url>https://releases.groupdocs.cloud/java/repo/</url>
</repository>

Install from source

To install the API client library to your local Maven repository, simply execute:

mvn clean install

To deploy it to a remote Maven repository instead, configure the settings of the repository and execute:

mvn clean deploy

Refer to the OSSRH Guide for more information.

Maven users

Add this dependency to your project’s POM:

<dependency>
    <groupId>com.groupdocs</groupId>
    <artifactId>groupdocs-translation-cloud</artifactId>
    <version>22.5</version>
</dependency>

Others

At first generate the JAR by executing:

mvn clean package

Then manually install the following JARs:

  • target/groupdocs-translation-cloud-22.5.jar
  • target/lib/*.jar

Get Started

Please follow the Quick Start instructions.

Translate Plain Text via Java Cloud SDK

import com.GroupDocs.translate.api.*;
import com.GroupDocs.translate.Configuration;
import static java.lang.System.out;


public static void main(String[] args) throws Exception {
        // add your client id here
        Configuration.setClient_id("XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX");

        // add your client secret here
        Configuration.setClient_secret("XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX");

        // add language pair here, see https://wiki.groupdocs.cloud/translationcloud/developer-guide/supported-languages/
        pair = ""

        // add text to translate here
        text = ""

        TextInfo textInfo = new TextInfo(pair, text);
        String userRequest = textInfoList.toString();
        TranslationTextRequest translationTextRequest = new TranslationTextRequest(userRequest);
        TranslationTextResponse translateTextResponse = TranslationApi.TranslateText(translationTextRequest);
        out.print(translateTextResponse.translation);
}

Authorization & Authentication

Authentication schemes defined for the API is as follows:

JWT

Product Page | Docs | Live Demos | Swagger UI | Code Samples | Blog | Free Support | Free Trial

VersionRelease Date
24.3March 22, 2024
24.1January 31, 2024
23.10December 11, 2023
23.1January 26, 2023
22.8September 1, 2022
22.5May 24, 2022
22.4April 27, 2022
22.2March 1, 2022
20.8.0January 25, 2022
20.12.0December 22, 2020
20.10.0November 4, 2020

GroupDocs Java REST API Maven SDK Java SDK Cloud REST REST API Cloud API MIT JWT oauth GroupDocs.Total Cloud GroupDocs.Translation Cloud JAR document automation document automation cloud document DOC DOCX DOCM RTF ODT XLS XLSX XLSM CSV TSV ODS PPT PPTX PPTM ODP PDF MD Markdown translate translator multi lingual language language pair translation pair JSON paragraph header footer footnote endnote image caption table pivot cells charts master slide notes comments frames convert conversion converter French English German Deutsch Chinese Spanish Italian Russian Arabic Portuguese Polish Ukrainian Vietnamese Indonesian Hindi Greek Dutch Hungarian Swedish Turkish Japanese Korean Czech Finnish Irish Slovak Farsi Persian Hebrew Azerbaijani Thai Romanian Malay Bulgarian English to French French to English English to German German to English English to Deutsch Deutsch to English English to Chinese Chinese to English English to Spanish Spanish to English English to Italian Italian to English English to Russian Russian to English English to Arabic Arabic to English English to Portuguese Portuguese to English English to Polish Polish to English English to Ukrainian Ukrainian to English English to Vietnamese Vietnamese to English English to Indonesian Indonesian to English English to Hindi Hindi to English English to Greek Greek to English English to Dutch Dutch to English English to Hungarian Hungarian to English English to Swedish Swedish to English English to Turkish Turkish to English English to Japanese Japanese to English English to Korean Korean to English English to Czech Czech to English English to Finnish Finnish to English English to Irish Irish to English English to Slovak Slovak to English English to Farsi Farsi to English English to Persian Persian to English English to Hebrew Hebrew to English English to Azerbaijani Azerbaijani to English English to Thai Thai to English English to Romanian Romanian to English English to Malay Malay to English English to Bulgarian Bulgarian to English French to German German to French French to Deutsch Deutsch to French French to Italian Italian to French French to Arabic Arabic to French