Browse our Products

If so you can download any of the below versions for testing. The product will function as normal except for an evaluation limitation. At the time of purchase we provide a license file via email that will allow the product to work in its full capacity. If you would also like an evaluation license to test without any restrictions for 30 days, please follow the directions provided here.

Docs Swagger Examples Blog Support Release Notes Dashboard

Installation

The package is available at pypi.org and it can be installed via pip by executing following command:

pip install groupdocs-translation-cloud

PyPI - Version PyPI - Downloads Python-GroupDocsCloud


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 have provided 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. Install SDK

Install groupdocs-translation-cloud with PIP from PyPI by:

pip install groupdocs-translation-cloud

Or clone repository and install it via Setuptools:

python setup.py install

3. Run Demo

  • Checkout the SDK or get from PiPy
  • Set Your client_id & client_secret
  • Run Jupyter Notebook demo.ipynb

Structure

This project includes:

  • Module “groupdocstranslationcloud”, this is SDK. You can integrate it in your application. It contains both Translation and Storage API
  • Module “test”, unittests. You can take a look at them to see various code examples.
  • Jupyter notebook “demo”. Sample demo notebook.

Dependencies

  • See requirements.txt

Versions support

Python :: 2.7, Python :: 3, Python :: 3.4, Python :: 3.5, Python :: 3.6, Python :: 3.7, Python :: 3.8

Translate Plain text

# Load the gem
import groupdocs_translation_cloud
# Get Client Id and Client Secret from https://dashboard.groupdocs.cloud
my_client_id = ""
my_client_secret = ""

# Create instance of the API
configuration = Configuration(apiKey=my_client_secret, appSid=my_client_id)
api = TranslationApi(configuration)

#document translation
pair = "en-fr"
_format = "docx"
storage = "First Storage"
name = "test.docx"
folder = ""
savepath = ""
savefile = "test_python.docx"  
masters = False
elements = []
translator = TranslateDocument(pair, _format, storage, name, folder, savepath, savefile, masters, elements)
request = translator.to_string()
res_doc = api.post_translate_document(request)
print(res_doc.message)

Documentation for API Endpoints

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

Class       MethodHTTP requestDescription
TranslationApi       autoPostPOST /autoTranslate any supported file
TranslationApi       csvPostPOST /csvTranslate CSV and TSV files
TranslationApi       documentPostPOST /documentTranslate Microsoft Word documents, rtf, txt, odt
TranslationApi       documentRequestIdGetGET /document/{requestId}Return document translation status. Also return URLs for downloading of translated document if translation was successful
TranslationApi       documentTrialPostPOST /document/trialTrial translate Microsoft Word documents, rtf, txt, odt without conversation. Translate only first page or 1000 symbols.
TranslationApi       hcGetGET /hcHealth check for all services.
TranslationApi       htmlPostPOST /htmlTranslate HTML files
TranslationApi       hugoGetGET /hugoGet hugo syntax structure from markdown file
TranslationApi       hugoPostPOST /hugoRun hugo syntax structure analyzing from markdown file
TranslationApi       imageToFilePostPOST /image-to-fileTranslate image or scanned pdf and return file
TranslationApi       imageToTextPostPOST /image-to-textTranslate text on image or scanned pdf
TranslationApi       languagesGetGET /languagesReturn list of available language pairs
TranslationApi       markdownPostPOST /markdownTranslate Markdown files
TranslationApi       pdfPostPOST /pdfTranslate pdf files
TranslationApi       pdfTrialPostPOST /pdf/trialTrial pdf translation. Translate only first page without conversion to another format.
TranslationApi       presentationPostPOST /presentationTranslate Microsoft PowerPoint presentations, odp
TranslationApi       resxPostPOST /resxTranslate RESX files
TranslationApi       spreadsheetPostPOST /spreadsheetTranslate Microsoft Excel workbooks, ods
TranslationApi       textPostPOST /textTranslate text
TranslationApi       textRequestIdGetGET /text/{requestId}Return text translation status. Also return translated text if translation was successful
TranslationApi       textTrialPostPOST /text/trialTrial translate text. Translate only 1000 symbols.

Documentation for Models

CloudFileResponse, CloudHugoResponse, CloudTextResponse, CsvFileRequest, FileRequest, HealthCheckStatus, HtmlFileRequest, HttpStatusCode, HugoRequest, ImageToFileRequest, ImageToTextRequest, LanguagePairData, MarkdownFileRequest, PdfFileRequest, PresentationFileRequest, ResxFileRequest, SpreadsheetFileRequest, StatusResponse, StringStringTuple, TextDocumentFileRequest, TextRequest, UrlFileInfo, WorksheetData

GroupDocs.Translation Cloud SKDs

GitHub

GitHub GitHub GitHub GitHub

Package Manager

NuGet Maven PyPI Android


Docs Swagger Examples Blog Support Release Notes Dashboard


groupdocs-net-rest-api nuget sdk net-sdk cloud rest rest-api cloud-api mit jwt oauth groupdocs-total-cloud groupdocs-translation-cloud 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


 English