Java Cloud SDK for text and document translation

Create applications based on GroupDocs.Translation API for any platform that supports Java. Focus on business logic rather than the technical details.

  • GroupDocs.Translation Cloud SDK for cURL
  • GroupDocs.Translation Cloud SDK for .NET
  • GroupDocs.Translation Cloud SDK for Python
  • GroupDocs.Translation Cloud SDK for Android
Start Free Trial

GroupDocs.Translation offers real-time machine translation for texts, documents, images and resources. Powerful machine learning algorithms and sophisticated neural networks provide a quality close to that of a professional human translator, but much faster and more cost-effective. Running on a high-performance cloud server hosted by GroupDocs, it can translate PDF, Microsoft Office and OpenOffice documents, Markdown files, and .NET resources into 46 European, Middle East and Asian languages (across 128 language pairs). The API not only translates text, but also accurately preserves metadata, structure, styles, and layout of documents.

This SDK greatly simplifies the interaction of Java code with GroupDocs.Translation Cloud services, allowing you to focus on business logic rather than the technical details. It handles all the routine operations such as establishing connections, sending API requests, and parsing responses, wrapping all these tasks into a few simple methods that can be used in any Java application. The Java SDK, demo applications, documentation, and examples are open source distributed under the MIT license. You can use them for any purpose and change any part of the code.

Advanced features of GroupDocs.Translation Cloud SDK for Java

Translates to and from 46 European, Middle East and Asian languages

Translates tables in Word documents and PowerPoint presentations

Translates headers and footers in documents

Translates footnotes and endnotes in Word documents

Translates image captions in Word documents

Translates text frames, charts and slides in PowerPoint presentations

Translates texts inside spreadsheet cells

Translates charts and pivot tables in Excel workbooks

Translates Markdown files preserving all common Markdown formatting

Translates files from URLs and public repositories

Converts results into different formats without additional software

Detailed developer reference based on Swagger collection

Quick start with document translation SDK for Java

GroupDocs.Translation Cloud SDK for Java comes with detailed developer guides and live code examples 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 use the SDK.

Any language, platform and storage service provider

GroupDocs.Translation Cloud is a REST 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 in Java

  package com.groupdocs;
  // Import classes
  import com.groupdocs.model.*;
  import org.openapitools.client.api.TranslationApi;
  public class TextDemo {
      public static void main(String[] args) {
          String basePath = "https://api.groupdocs.cloud/v2.0/translation";
          String cliendId = "YOUR_CLIENT_ID";
          String clientSecret = "YOUR_CLIENT_SECRET";
          ApiClient defaultClient = new ApiClient(basePath, cliendId, clientSecret, null);
          TranslationApi translationApi = new TranslationApi(defaultClient);
          TextRequest request = new TextRequest();
          request.setSourceLanguage("en");
          request.addTargetLanguagesItem("de");
          request.addTextsItem("Text to translate");
          try {
              String r = translationApi.textPost(request).getId();
              CloudTextResponse response = translationApi.textRequestIdGet(r);
              if (!response.getStatus().toString().equals("500")) {
                  while (true) {
                      response = translationApi.textRequestIdGet(r);
                      if (response.getStatus().toString().equals("200")) {
                          System.out.println(response);
                          break;
                      }
                      try {
                          Thread.sleep(2000);
                      } catch (InterruptedException e) {
                          e.printStackTrace();
                      }
                  }
              }
          }
          catch(ApiException e){
              System.err.println("Exception when calling TranslationApi#textPost");
              System.err.println("Status code: " + e.getCode());
              System.err.println("Reason: " + e.getResponseBody());
              System.err.println("Response headers: " + e.getResponseHeaders());
              e.printStackTrace();
          }
      }
  }           

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 offers SDKs for popular programming languages and platforms:

  Türkçe