How to automate your localization workflow with Callbacks and Webhooks

At POEditor, we offer plenty of ways to keep yourself updated about the status of your localization projects. Polling the API over and over, however, is not always the most efficient way to go around this.

To use Callbacks and/or Webhooks would be a wiser way instead.

What are Callbacks

Using Callbacks is a “don’t call us, we’ll call you” kind of process.

Basically, what Callbacks do is fire a request to an endpoint specified by you every time an event is triggered. Events include: language is completely translated, language is completely proofread and so on.

POEditor callbacks form

Now, with this information you can get the gears going. If you use a code hosting service integration, you will probably want to push the updated language file to your repository. You can easily do that from the UI by selecting the language and clicking on the Export option. OR you can do this automatically by calling a webhook.

What are Webhooks

Webhooks are HTTP calls you define, using the Webhooks generator in your POEditor account.

Webhooks Generator - POEditor localization management platform

How to use Callbacks with Webhooks

The script on your specified endpoint can read the payload sent along with the callback, identify the completed language, find the webhook associated with that language and fire it.

You can automate the process in the other direction too. You can set your code hosting service (or your CI system if the service doesn’t allow that) to fire an “import” webhook when pushing changes to the localization branch. This will get the new terms from your repo and add them to your POEditor project.

How to notify translators about new work

If there are new terms in the commit and there is a callback set with the “new terms” event, that can call a script to notify your translators that there’s work to be done.

The notification script can make use of the list contributors API endpoint. With it, you can easily get the emails of the translators that need to be notified about the new task.

After the translators complete the language the whole circle is closed.

Of course, you can use these systems just in part, to fit your particular localization workflow. If necessary, you can add extra steps for verification, QA, staging, testing and so on. It’s all up yo you.

Leave a Reply

Your email address will not be published. Required fields are marked *