This feature is available starting from the Pro plan.
The Custom processor app enables you to utilize your own third-party service to process the uploaded and downloaded translation files. Basically, before the translations are imported to or exported from Lokalise, it will be sent to your service and you'll have a chance to modify them as you like.
Here are some use cases where the custom processor can come in really handy:
Clean up the imported translations by removing unneeded special characters.
Apply special formatting to the imported or exported translations.
Remove unwanted (banned) words from your texts.
Restructure or even rename the exported translation keys.
Using the app
To get started, open your Lokalise project and click Apps:
Find the Custom processor in the apps list, and click Install. You are going to see the following screen:
Import Custom Processor URL — enter the URL you would like to send the imported translations to.
Export Custom Processor URL — enter the URL you would like to send the exported translations to.
File format — choose one of the file formats to enable this custom processor for, or specify All supported formats.
Once you are ready, click the Enable app button.
Now you can perform file imports and exports as usual and your custom processor will be able to modify translation data in any way you need.
Both the import and export URLs must respond to HTTP POST requests.
You can find sample data sent to the import URL in the following Gist.
You can find sample data sent to the export URL in the following Gist.
Your processors can modify the received data in any way you want (specifically, by changing or parsing translations, adding custom attributes, descriptions, attaching screenshots, using third-party services to perform machine translation, etc). However, data returned by the processors must preserve the initial structure.