Custom Pre-Export Processor FreeBeta

ByAwesome CrowdinVerified Author

This application allows you to process translated strings before exporting with custom code.



Copy link

This application allows you to process translated strings before writing them into the translated resource file with your own JavaScript code.


Copy link

JavaScript code is executed in a sandboxed environment with no access to I/O (file system, network) or external NPM modules.

This app will expose the following variables in the global environment:

  • strings - an array of objects containing all strings Crowdin identified as translatable. Please refer to the Developer Portal to learn more about the data structures.
  • fileName - the name of the uploaded file;
  • projectId - Crowdin project ID;
  • languageId - Target language Crowdin ID;
  • error - the error message you want to return. If set, the import will be aborted and the error message will be shown to the user;

Edit string properties inside the strings array to introduce changes you need.

Example application

Copy link

Replace Product with SUPER

for(const string of strings) {
    string.translations[languageId].text = string.translations[languageId].text.replace('Product', 'SUPER!');

In JSON files, set the value to empty string for all untranslated strings.

if (fileName.endsWith('.json')) {
    for (const string of strings) {
        if (string.translations[languageId].status == 'untranslated') {
            string.translations[languageId].text = '';


Copy link


File Formats
Works with
  • Crowdin Enterprise

Released on Sep 23, 2023

Updated on Oct 28, 2023

Published by Awesome Crowdin