File Pre-Export Processing Module
The pre-export module allows you to modify the strings before the file export. This module works with both the source strings and their respective translations. The pre-export module is especially useful if you’d like to preserve the original file structure and export it as it is but want to make some changes to translated strings.
With the help of the pre-export module, you will get a payload with the file content and strings for export. Using the pre-export module, you can modify translated strings and return them for export. This allows you to customize the strings without directly modifying the file content.
Access
You can grant access to this module to one of the following user categories:
For Crowdin:
- Only me (i.e., project owner)
- All project members
- Selected users
For Crowdin Enterprise:
- Only organization admins
- All users in the organization projects
- Selected users
Structure
Properties
key | Type: Required: yes Description: Module identifier within the Crowdin app. |
url | Type: Required: yes Description: The relative URL triggered on file export. |
signaturePatterns | Type: Description: Contains |
Communication between File Processing App and Crowdin
When exporting a file, the system detects an appropriate pre-export module using the signaturePatterns
parameter and makes an HTTP request to the app’s URL ($baseUrl . $url
) for further processing containing the source strings and their respective translations.
The file processing app will modify the string translations according to your needs. Make sure that the pre-export module returns the original string quantity along with their string uniqId to ensure a successful translation export. Once the modified strings are returned from the pre-export module, they are used to build a translation file.
Request to the File Processing App
Request payload example:
Properties:
jobType | Type: Value: Description: Specifies the action of the file pre-export module. |
file.content , file.contentUrl | Type: Description: Parameters used to pass the base64 encoded source file content ( |
strings , stringsUrl | Type(strings): Type(stringsUrl): Description: Parameters used for the source strings and their respective translations before the file export. |
Expected Response from the App
Response payload example:
Properties:
data.strings , data.stringsUrl | Type(data.strings): Type(data.stringsUrl): Description: Parameters used to pass the modified strings content. |
error.message | Type: Description: An error message that can be passed from the app to Crowdin and will be visible to a user in the UI. |
Strings Array Structure
Below you can see an example of the strings that app will receive before the export. The same structure is used for the modified strings in the app response.
Payload example:
Properties:
uniqId | Type: Description: Unique identifier within the file. |
identifier | Type: Description: Visible string key. |