Skip to main content

GroupDocs.Translation Cloud SDK

Project description

GroupDocs Translation Cloud

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

For convenience of our Python 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 translaton 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

Release 20.12

  • Conversion of translated files to other formats is added

Release 20.10

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

Release 20.9

  • French-German language pair support

Release 20.8:

  • GroupDocs.Translation Cloud Python SDK

Features:

  • Translation of Microsoft Word and Microsoft Excel 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
  • Conversion of translated files to other formats like pdf, tiff, xps, etc.
  • API that allows you manage your files and folders in our Cloud

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.

Examples

from groupdocstranslationcloud.configuration import Configuration
from groupdocstranslationcloud.api.translation_api import TranslationApi
from groupdocstranslationcloud.models.translate_text import TranslateText
from groupdocstranslationcloud.models.translate_document import TranslateDocument

#enter valid apiKey and appSid
configuration = Configuration(apiKey="", appSid="")
api = TranslationApi(configuration)

# text translation
pair = "en-fr"
text = "Welcome to Paris"
translator = TranslateText(pair, text)
request = translator.to_string()
res_text = api.post_translate_text(request)
print(res_text.translation)

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

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

GroupDocs.Translation Cloud SDKs

.NET Java PHP Ruby Python Node.js Android

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

groupdocs_translation_cloud-20.12.1-py3.7.egg (99.5 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page