Efficiency is key when it comes to localization. Automations can help you save time and effort by automatically performing certain actions on your translations. This way, you can focus on more important tasks and let SimpleLocalize take care of the rest. In this article, we'll show you how to set up automations in SimpleLocalize to speed up your localization workflows.
Table of contents
What are automations?
Automations are a set of rules that define how SimpleLocalize's translation editor should behave when certain conditions are met. A translation change made in the editor directly or via CLI or API can trigger an automation and make the editor perform a specific action. This can help you automate repetitive tasks and streamline your localization workflows.
You can use automations to automatically translate texts, clear translations when the default language translation is updated, or change the review status when translations are updated.
Trigger
A trigger is an event that starts automation. It's a condition that needs to be met for the automation to be executed.
A trigger in SimpleLocalize automations is a change in the translation. It can be a new translation key or a new or edited translation value.
![Automation trigger](/blog/automations/automation-trigger.jpeg)
You can filter the trigger by specifying which language should trigger the automation (change in the default language, in all other languages, or any language) and the source of the change (manual change in the translation editor, CLI, or API).
Actions
An action is a task that the automation performs when the trigger condition is met. You can choose from various actions, such as:
Auto-translate
The auto-translate action automatically translates the edited translation to all other languages. You can specify which translations should be auto-translated, depending on their review status. E.g., auto-translate only those translations that are marked as Needs review.
Thanks to auto-translate, you can quickly update translations in all languages when the default language translation is edited.
![Auto-translate action](/blog/automations/auto-translate-action.jpeg)
Change review status
Change review status action allows you to update the review status automatically to Accepted or Needs review when the translation is edited. You can specify which translations should have their review status changed, depending on the language.
It's useful when you want to mark translations as reviewed or unreviewed after they have been edited.
You can choose if the review status should be changed to selected status for:
- all languages
- default language only
- all languages except the default language
- the language in which the translation was edited (trigger language)
- all languages except the language in which the translation was edited (trigger language)
![Change review status action](/blog/automations/change-review-status-action.jpeg)
Clear translations
When a translation is edited, you can automatically clear translations in all other languages. This action is useful when you want to make sure that all translations are up-to-date and consistent with the default language translation.
The clear option can be filtered by the review status of the translations. You can choose to clear only translations that are marked as Needs review.
![Clear translations action](/blog/automations/clear-translations-action.jpeg)
How to set up automations in SimpleLocalize
Automations are available in your project settings. You can create a maximum of three automations per project, and they will work in the selected order when enabled.
![Automations settings](/blog/automations/automations.jpeg)
Tip: Make sure to set your default language before creating automations. The default language is the language that all other languages are translated from.
To set up automations in SimpleLocalize, follow these steps:
-
Click on the Create automation button to create a new automation. First, enter the automation name to help you identify the automation later.
-
Next, in When section, choose the trigger for the automation and specify the conditions that need to be met for the automation to be executed.
-
In Then section, select the action that the automation should perform when the trigger condition is met. You can select from auto-translate, change review status and clear translations.
-
When you're done, click the Save automation button to save the automation. You can enable or disable the automation at any time by toggling the switch above the automation name in the settings.
Tip: Use a descriptive automation name that reflects the purpose of the automation (e.g. Auto-translate new keys).
Here, you can see an example of an automation that automatically translates edited keys to all other languages if their review status is Needs review:
As you can see, automation auto-translates only the translation in Polish because it is marked as Needs review. The Spanish translation doesn't meet the condition, so it won't be auto-translated.
Use cases
Automations can help you automate repetitive tasks, speed up the translation process, and streamline your localization workflows. Below, you can check out some examples of how you can use automations in SimpleLocalize.
Automatically translate new keys
Whenever a new key is added to the default language, you can automatically translate it to all other languages. This way, you can quickly update translations in all languages without having to do it manually.
This automation is very simple: When translation changes, auto-translate it to all other languages.
Clear translations when the default language is updated
This automation clears translations in all other languages when the default language translation is updated. This way, you can make sure that all translations are up-to-date and consistent with the default language translation.
Automation: When translation changes, clear translations in all other languages.
Change review status when translations are updated
Whenever a previously accepted translation is edited, you may want to verify translations to other languages. In that case, the automation can change the review status to Needs review for all translations in other languages.
Automation: When translation changes, set review status to Needs review for all other languages.
Combine automations
When you create multiple automations, they will run one after another in the order you set them up. This way, you can combine actions to automate more complex tasks.
If we keep the order of automations from the examples above, the following actions will be performed when the default language translation is updated:
- other languages will be auto-translated
- then they will be cleared
- and finally, the review status will be changed to Needs review.
Which doesn't make much sense in this case, but you can adjust the order of automations to better suit your needs.
Now, after the change, old translations will be cleared first, then auto-translated, and finally marked as Needs review.
This way, you can customize the workflow to better suit your needs.
Summary
The Automations feature can be a great help in speeding up your localization workflows by automating repetitive tasks. They can help you save time and effort by automatically performing certain actions on your translations, so you don't have to perform them manually or remember about them. SimpleLocalize will do it for you.