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.
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. You can also call the Credit Data API's Check Sufficient Credits method at any time to check whether the site has enough credits to translate the specified number of words.
- Apps that use machine translation deduct credits from the site's word credit balance.
- 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: A unit of translation capacity, where 1 credit equals 1 word to translate. Each site has a word credit balance indicating the number of words available for translation. Successful translation requests reduce 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. Wix users can receive additional word credits by purchasing a translation package in the Translation Manager at any time.