Document Translation REST API & Java SDK

Add features of documents and plain text translation in your Java applications using Cloud REST API. Accurately translate between 10 most widely used business languages.

Start Free Trial
GroupDocs.Translation Cloud SDK for Java

GroupDocs.Translation Cloud SDK for Java

 
 

GroupDocs.Translation Cloud SDK for Java makes it simple for developers translating the contents on Microsoft Word, Excel and plain text documents without using any external software. The API employs a smart neural machine translation approach to translate text from Microsoft Word documents (paragraphs, tables, image captions, headers, footers, footnotes, endnotes) and Excel Worksheets (charts, tables, cells, pivot tables) into 20 language pairs. The SDK supports converting English text from supported document formats to and from French, German, Chinese, Italian, Spanish, Russian, Arabic, Polish and Portuguese languages while keeping the original document structure undisturbed.

GroupDocs.Translation REST API can easily integrate into existing systems thus managing the low-level details of API requests and handling responses to boost up the overall productivity. You just need to pass out request parameters (path of source file name, format & folder, choose the language pair to translate between, mention the name of translated file, folder and location of the target file to be stored) and get the documents translated by adding a few lines of code.

 

Advanced Document Translation REST API Features

 

 

Supports 10 languages and 20 language pairs

 

Translation of tables in Word documents

 

Translation of headers and footers in Word documents

 

Translation of footnotes and endnotes in Word document

 

Translation of image captions in Word documents

 

Translation of cells containing text in Excel workbooks

 

Translation of charts in Excel workbooks

 

Translation of tables in Excel workbooks

 

Translation of pivot tables in Excel workbooks

 

APIs are secured and require authentication

 

API explorer based on swagger collection

Get Started with Document Translation REST API

GroupDocs.Translation Cloud API comes with detailed developer guides and live code examples for all major programming languages to start working with API features in no time. Simply create a free account at GroupDocs Cloud, get APP SID & Key information to communicate with GroupDocs Cloud API and you are ready to make an API request on any platform using cURL commands or the SDKs of your choice.

Translate Word document - Java


//Get your App SID, App Key and Storage Name at https://dashboard.groupdocs.cloud (free registration is required).

import com.GroupDocs.translate.api.*;
import com.GroupDocs.translate.Configuration;


private static void setUpConfig() throws Exception {
    Configuration.setAPP_SID("XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX");
    Configuration.setAPI_KEY("XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX");
    }

public String TranslateDocument() {
    String name = "test.docx";
    String folder = "";
    String pair = "en-fr";
    String format = "docx";
    String storage = "First Storage";
    String saveFile = "translation.docx";
    String savePath = "";
    FileInfo fileInfo = new FileInfo(name, folder, pair, format, storage, saveFile, savePath);
    TranslationDocumentRequest translationDocumentRequest = new TranslationDocumentRequest(fileInfo.toString());
    TranslateDocumentResponse translateDocumentResponse = TranslationApi.TranslateDocument(translationDocumentRequest);
    return translateDocumentResponse.message;
}

Any Language, Platform and Storage Service Provider

GroupDocs.Translation for Cloud is a REST based API that can easily be integrated with any language or platform, capable to manage HTTP requests and responses. It supports all popular cloud storage services such as Google Cloud, Drive, DropBox and Amazon S3 to interact without any dependencies.

Translate plain text - Java


//Get your App SID, App Key and Storage Name at https://dashboard.groupdocs.cloud (free registration is required).

import com.GroupDocs.translate.api.*;
import com.GroupDocs.translate.Configuration;


private static void setUpConfig() throws Exception {
    Configuration.setAPP_SID("XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX");
    Configuration.setAPI_KEY("XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX");
    }

static String TranslateText() {
    pair = "en-fr";
    text = "Text to translate";
    TextInfo textInfo = new TextInfo(pair, text);
    TranslationTextRequest translationTextRequest = new TranslationTextRequest(TextInfo.toString());
    TranslationTextResponse translateTextResponse = TranslationApi.TranslateText(translationTextRequest);
    return translateTextResponse.translation;
}

Security and Authentication

The GroupDocs.Translation Cloud API is SSL secured and the authentication requests require a signature and AppSID query parameters or OAuth 2.0 authorization header.

 

Support and Learning Resources

 
  

GroupDocs.Translation Cloud also offers document translation SDKs for other languages as listed below: