About the Wix Multilingual Translation APIs

Wix Multilingual Translation APIs allow you to add multilingual support to your app, enabling Wix users to translate and manage their content across different locales. This ensures site visitors can access content in their preferred language. Learn more about the Wix Multilingual feature.

Workflow for using the Translation APIs

Wix Multilingual Translation APIs include three services: Translation Schema, Translation Content, and Translation Published Content.

These services are intended to be used in a specific sequence as part of a defined flow:

  1. Define the translation schemas.
  2. Add the original content to be translated.
  3. Translate and manage the content.
  4. Publish the translated content.

Step 1 | Define translation schemas

A translation schema is a blueprint that defines how your app’s data is structured and which fields are translatable. It specifies fields like "Title" or "Description" and any associated rules, such as character limits or formats.
Use the Translation Schema API to organize your app’s content for translation and manage which fields can be translated. You can create schemas for each of your app's entities. For example, a food delivery app might have one schema for a menu and another for orders.

This step only needs to be done once, providing a foundation for all future translations.

Step 2 | Add original content to be translated

After defining the schema and the translatable fields, you need to add original content for those fields. This original content, provided in the site's primary language, serves as the foundation for all translations. Depending on your app, this content can either be user-generated or default content provided by your app:

  • User-generated content: If your app collects user-generated content, prompt Wix users to provide the relevant content. Call the Translation Content API's Create Content method to save this collected content, ensuring it aligns with the schema you defined in the previous step.
  • Default content: If your app provides boilerplate or default content, call the Translation Content API’s Create Content method with this default content initially. If at a later time users provide their own content, call the Update Content method to replace the default content with user-generated content.

Step 3 | Translate and manage the content

Once the original content is added, it can be translated and stored in the following ways:

  • The Wix user can generate translations in the Translation Manager, either manually or using machine translation. When the Wix user saves the translations, the Translation Manager automatically calls the Translation Content API to store the translated content and mark it as ready to publish.
  • Your app can generate the translations or use a third party service to generate them. Wix's Machine Translation API is available for this purpose. Then, call the Translation Content API to store the translated content and flag it for publishing.

Step 4 | Publish the translated content

Before rendering site content, call the Translation Published Content API to retrieve the translated content flagged for publishing and display it in the site visitor’s language. This ensures site visitors see the appropriate translation content for their locale.

Was this helpful?
Yes
No