Skip to content

rsinda/groupdocs-translation-cloud-python

 
 

Repository files navigation

PyPI PyPI - Python Version PyPI - Implementation PyPI - Wheel GitHub license

Python SDK for Translating Cloud Documents

GroupDocs.Translation Cloud is Cloud API to translate Word, Excel and PowerPoint files as well as plain text.

For convenience of our Java customers we introduce a simple SDK used to add translation of Microsoft Word documents, Microsoft Excel workbooks, Microsoft PowerPoint presentations and plain text to your app with merely a few lines of code.

In detail, it's a set of SDKs for document and plain text translation in our Cloud. It supports translation of .doc, .docx, .docm, .xls, .xlsx, .xlsm, .ppt, .pptx, .pptm files. Just pass a specific file or text to the GroupDocs.Translation Cloud API, and it will translate and save translated file in our Cloud or will return translated text.

It is easy to get started with GroupDocs.Translation Cloud, and there is nothing to install. Create an account at GroupDocs Cloud and get your application information, then you are ready to use SDKs

Cloud Document Translation Features

  • Translation of Microsoft Word, Microsoft Excel,, and Microsoft PowerPoint documents
  • 10 languages and 22 languages pairs support
  • Translation of tables, headers, footers, footnotes/endnotes, image captions in Word documents
  • Translation of cells, charts, tables, pivot tables in Excel documents
  • Translation of text frames, tables, headers, footers, charts, comments in PowerPoint presentations
  • Translation of plain text
  • API that allows you to manage your files and folders in our Cloud

Supported Formats

GroupDocs.Translation Cloud allows to translate Microsoft Word and Excel documents. User should specify format of document to translate putting in the request’s body:

  • extension of word file (docx / docm / doc) — to translate Microsoft Word document
  • extension of excel file (xlsx / xlsm / xls) — to translate Microsoft Excel workbook
  • extension of powerpoint file (ppt / pptx / pptm) — to translate Microsoft PowerPoint presentation

Additionally, user could obtain translated file in any other format available for conversion. Just specify output format of translated document putting file extension in the request’s body:

  • doc, docx — docx, rtf, html, odt, txt, md, pdf, tiff, svg, xps
  • xls, xlsx — xlsx, xlsb, html, pdf, xps, ods, md, docx, pptx, tiff
  • ppt, pptx — pptx, pdf, tiff, html, xps, odp

New Features & Enhancements Release 20.12

  • Conversion of translated files to other formats is added

New Features & Enhancements Release 20.10

  • Microsoft PowerPoint presentations translation
  • French-Italian language pair support

New Features & Enhancements Release 20.9

  • French-German language pair support

New Features & Enhancements Release 20.8

  • GroupDocs.Translation Java SDK

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 to integrate with us.

Quickstart

Make your solution using SDK, follow these steps:

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.

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 Word document

# 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)

GroupDocs.Translation Cloud SDKs in Popular Languages

.NET Java Python
GitHub GitHub GitHub
NuGet Maven PIP

Home | Product Page | Docs | Demos | API Reference | Examples | Blog | Free Support | Free Trial

About

Python library for communicating with the GroupDocs.Translation Cloud API

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 98.0%
  • Jupyter Notebook 2.0%