Create applications based on GroupDocs.Translation API for any platform that supports Java. Focus on business logic rather than the technical details.
Start Free TrialGroupDocs.Translation offers real-time machine translation for texts, documents 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 37 European, Middle East and Asian languages (across 78 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.
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.
//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 = "";
boolean masters = false;
ArrayList elements = new ArrayList();
FileInfo fileInfo = new FileInfo(name, folder, pair, format, storage, saveFile, savePath, masters, elements);
TranslationDocumentRequest translationDocumentRequest = new TranslationDocumentRequest(fileInfo.toString());
TranslateDocumentResponse translateDocumentResponse = TranslationApi.TranslateDocument(translationDocumentRequest)
return translateDocumentResponse.message;
}
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.
//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;
}
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.