About the Machine Translation API

The Machine Translation API allows you to render text from one language to another using machine translation. With this API you can provide translatable content from your code and Wix returns the translated text.

With the Machine Translation API, you can:

  • Translate text from plaintext, HTML, or rich content objects.
  • Bulk translate up to 1,000 units of text.

Before you begin

It's important to note the following before starting to code:

  • Only text translation is supported.
  • Wix does not overwrite the original content source, so make sure to store the returned translatedContent object separately if you want to retrieve it at a later time.
  • Translation requests must not exceed 5,000 characters or the request fails with a TEXT_TOO_LONG error.
  • If the site does not have sufficient word credits to translate all of the text in the request, the request fails with a NOT_ENOUGH_CREDITS error.
  • Note that translated blogs and emails reduce a site's word credits, but are not included in the count displayed in a site's dashboard.

Use case

Terminology

  • Machine translate: Wix uses an external service to translate text to other languages. Alternatively, a site owner can manually translate their content with the Translation Manager.
  • Translatable content: Content that is able to be machine translated with this service. Learn more about translatable and untranslatable content.
  • Word credit: Each site has a word credit balance, starting at 3,000 words. Each successful translation request reduces the word credits by the number of words in contentToTranslate. If the site does not have sufficient word credits to translate all of the text in the request, the request fails with a NOT_ENOUGH_CREDITS error. Additional credits can be purchased through the Dashboard.
Did this help?