Upload settings 🔗
The Upload settings allow you to adjust the process of uploading content to Localazy with various settings.
Allow automated upload to Localazy & Automated upload triggers 🔗
The integration allows to automatically upload:
- a newly created entry,
- an updated entry,
- both 1. and 2.
To allow the automatic content upload, switch ON the Allow automated upload to Localazy.
Next thing that needs to be done (as this itself does not make any change), is to select the Automated upload triggers. There are two available triggers (according to the options above):
- Creating new data entry
- Editing data entry
If applicable, after the selected trigger(s) the upload process will happen.
Hit Save to apply the new settings.
This option still respects the Content Transfer Setup, hence make sure that it’s been set up properly.
Deprecate source keys on deletion 🔗
If active (ON), then source keys in Localazy will be automatically set as deprecated if an entry in source language is deleted in Strapi.
If applicable, the deprecation process is triggered before the deletion itself.
This works for both deleting the single/multiple entries via Strapi Admin UI.
Download Settings 🔗
You can also adjust the Download settings.
Webhooks automation - Strapi 🔗
The plugin allows to trigger the Download to Strapi process automatically by connecting the Strapi the Localazy Webhooks feature.
There are a few steps that need to be done to make the whole process work.
On the side on the plugin, there are Processing of download webhook, Webhook actions author and Allowed webhook languages options you need to configure.
Processing of download webhook
To allow accepting the webhooks from Localazy, turn this option ON. If OFF, then even when a webhook from Localazy is received, the processing would be skipped.
Webhooks actions author
In terms of Strapi, it’s required to have a user assigned to a database action (which creating/update of an entry during the Download to Localazy is). Therefore, it is needed to select one of the created users from the list. If there is not any user selected, then the webhook won’t be processed.
Allowed webhook languages
You can set the triggers to download only selected languages when the Download to Strapi procedure has been triggered.
You can select multiple languages that will be processed or leave the field blank. If none of the languages are selected, all the available languages in the connected Localazy project will be processed.
Webhooks automation - Localazy 🔗
Another step needed to make the automation work is adding a webhook. To add a webhook that will be sent to a user’s Strapi instance, the Endpoint URL input needs to have the following structure:
[strapi-instance-host]/localazy/public/transfer/download e.g. https://www.testing-strapi.host/localazy/public/transfer/download
Then, set up the rest of the webhook.
If everything is configured correctly in both Strapi and Localazy, the automated Download to Strapi would trigger when webhook is sent to the Strapi instance.
You can see logs regarding the automated download in the server console output. This way any errors can be debugged.
[2023-03-07 11:38:56.931] info: Localazy Plugin: Webhook of type 'comment_added' procedure started [2023-03-07 11:38:58.070] info: The Localazy locale cs already exists. [2023-03-07 11:38:58.378] info: Updated api::best-friend.best-friend (cs) [2023-03-07 11:38:58.385] info: Updated api::best-friend.best-friend (cs) [2023-03-07 11:38:58.394] info: Updated api::best-friend.best-friend (cs) [2023-03-07 11:38:58.401] info: Updated api::best-friend.best-friend (cs) [2023-03-07 11:38:58.408] info: Updated api::best-friend.best-friend (cs) [2023-03-07 11:38:58.438] info: Updated api::friend.friend (cs) [2023-03-07 11:38:58.462] info: Updated api::friend.friend (cs) [2023-03-07 11:38:58.471] info: Updated api::friend.friend (cs) [2023-03-07 11:38:58.499] info: Updated api::friend.friend (cs) [2023-03-07 11:38:58.499] info: Localazy Plugin: Webhook of type 'comment_added' procedure finished [2023-03-07 11:38:58.499] http: POST /localazy/public/transfer/download (1569 ms) 200