Sample Use Cases and Flows

This article presents some possible use cases you can support. This can be a helpful jumping off point as you plan your implementation.

Check credits before using machine translation

You can check whether a site has enough credits before initiating the machine translation process.

  1. Calculate the total number of words that need to be translated.

  2. Call Check Sufficient Credits and specify the word count to determine whether the site has enough credits for the translation.

  3. If there are sufficient credits, use the Machine Translation API to translate the content. If not, the Wix user needs to purchase additional credits in the Translation Manager.

Create a translation credit dashboard

You can create a dashboard that displays the credit quota, usage, and remaining credits for multiple sites.

  1. For each site, periodically call Get Credit Data to obtain the quota type, quota amount, and the number of credits used at a given time.

  2. For sites with a limited quota, calculate the remaining credits by subtracting the used credits from the quota.

  3. Display this data in your dashboard and a notification system to alert Wix users when their site's credit balance is running low.

Did this help?