This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.
Translates the text of multiple units of translatable content from one supported language to another.
Each translated content item in the results
array returns with the same id
as the corresponding contentToTranslate.id
, but with the text in the
content fields replaced with the translated text. Note that Wix does not overwrite the original content source,
to retrieve the translated content later, make sure to store it separately.
Only text content is translated, even if the content is htmlContent
or richContent
. Note that collapsible text
cannot be translated using this method.
Each unit of translatable content must not exceed 5,000 characters. If this limit is exceeded, the method returns a TEXT_TOO_LONG
error.
For richContent
, the 5,000-character limit applies separately to each node in richContent.nodes
.
The total request may exceed 5,000 characters as long as no individual node surpasses this limit.
If any node exceeds 5,000 characters, then the request fails for that specific contentToTranslate
item and the error details for that
error are returned in itemMetadata
. Even if some translations fail due to the character limit,
the machine translation for other items will succeed if they are under the character limit.
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 included in contentToTranslate
.
If the site does not have sufficient word credits to complete the translation, then the entire request fails
with a NOT_ENOUGH_CREDITS
error. Additional credits can be purchased through the Dashboard.
To translate a single unit of translatableContent
, use Machine Translate.