File Pre-Import Processing Module
The pre-import module allows you to modify your files before importing them to Crowdin. With the pre-import module, you can apply automated modifications to selected files. This module can work with a wide range of file formats, such as TXT, XML, JSON, and many more, to customize their contents.
By using the pre-import module in your Crowdin app, you can adjust the file format, structure, and content. Since the module is executed before Crowdin imports the file, you can fine-tune the content before the file is processed by the system.
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 import, update, and translation upload. |
signaturePatterns | Type: Description: Contains |
Communication between File Processing App and Crowdin
When importing a file, Crowdin detects an appropriate module using the signaturePatterns
parameter and makes an HTTP request to the app’s URL ($baseUrl . $url
) for further processing.
Additionally, during the file import, Crowdin will also validate the file name and content to ensure they match the appropriate file processing app modules. This process can include the pre-import processing module to modify the content of the file before it is imported and the post-import processing module to modify the strings extracted from the file.
To modify the file content, the system first locates the appropriate pre-import module and sends the file content to it. The module then performs the predetermined modifications, which may include file format changes, structure, and content updates.
Once the pre-import module has completed the file modifications, Crowdin receives the modified file content, as well as a new file name or extension if applicable.
Request to the File Processing App
Request payload example:
Properties:
jobType | Type: Value: Description: Specifies the action of the file pre-import module. |
file.content , file.contentUrl | Type: Description: Parameters used to pass the base64 encoded source file content ( |
Expected Response from the App
Response payload example:
Properties:
data.content , data.contentUrl | Type(data.content): Type(data.contentUrl): Description: Parameters used to pass the base64 encoded modified file content ( |
fileName | Type: Description: Optional parameter used to overwrite a file name and extension with a new one. |
fileType | Type: Description: Optional parameter to specify an importer Crowdin should use to import a file. |
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. |