Overview
You can create Crowdin apps that extend the functionality of Crowdin by adding new modules to the Crowdin UI. Modules are displayed in the Crowdin UI and can be used to add new features or modify existing ones.
Supported Modules
Section titled “Supported Modules”Each module is declared under its configuration key. SDK links to the module’s page in these docs; Crowdin links to the module’s manifest reference in the Crowdin developer docs.
UI Extensions
Section titled “UI Extensions”| Module | Config key | Description | Docs |
|---|---|---|---|
| Profile Menu | profileResourcesMenu | Page in the user profile menu. | Crowdin |
| Profile Settings Menu | profileSettingsMenu | Tab in the user account settings. | Crowdin |
| Organization Menu | organizationMenu | Page in the organization menu. | Crowdin |
| Organization Settings Menu | organizationSettingsMenu | Tab in the organization settings. | Crowdin |
| Project Menu | projectMenu | Tab in the project menu. | Crowdin |
| Project Menu Crowdsource | projectMenuCrowdsource | Tab on the public page of a crowdsourced project. | Crowdin |
| Project Tools | projectTools | Page in the project’s Tools section. | Crowdin |
| Project Reports | projectReports | Page in the project’s Reports section. | Crowdin |
| Group Reports | groupReports | Page in the Reports section of a project group. | Crowdin |
| Context Menu | contextMenu | Context menu item that opens an app module or a URL. | SDK · Crowdin |
| Modal | modal | Modal dialog opened from a context menu item. | SDK · Crowdin |
| Chat | chat | Chat dialog in the right panel, available across the UI. | SDK · Crowdin |
| Announcement | announcement | Organization-wide message in the header alert or on a glossary page. | SDK · Crowdin |
Editor and Quality
Section titled “Editor and Quality”| Module | Config key | Description | Docs |
|---|---|---|---|
| Editor Right Panel | editorRightPanel | Panel in the Crowdin Editor. | Crowdin |
| Editor Button | editorButton | Editor button that opens a panel or modal, or sends an event. | SDK · Crowdin |
| Custom MT | customMT | Machine translation engine not supported by Crowdin out of the box. | SDK · Crowdin |
| Custom Spellchecker | customSpellchecker | Spellchecker with custom rules. | SDK · Crowdin |
| External QA Check | externalQaCheck | Validates translations against your own rules. | SDK · Crowdin |
| Advisor Inspector | advisorInspector | Check that reports insights to Crowdin Advisor. | SDK |
File Processing
Section titled “File Processing”| Module | Config key | Description | Docs |
|---|---|---|---|
| Custom File Format | customFileFormat | Parses and builds files in a format Crowdin doesn’t support. | SDK · Crowdin |
| File Pre-Import | filePreImport | Modifies files before import. | SDK · Crowdin |
| File Post-Import | filePostImport | Modifies parsed strings after import. | SDK · Crowdin |
| File Pre-Export | filePreExport | Modifies strings before export. | SDK · Crowdin |
| File Post-Export | filePostExport | Modifies files after export. | SDK · Crowdin |
| Translation Alignment | fileTranslationsAlignmentExport | Aligns translations with source strings after export. | SDK · Crowdin |
| Module | Config key | Description | Docs |
|---|---|---|---|
| AI Provider | aiProvider | Connects AI models to Crowdin. | SDK · Crowdin |
| AI Prompt Provider | aiPromptProvider | Generates prompts for custom and built-in AI providers. | SDK · Crowdin |
| AI Request Processors | aiRequestPreCompile, aiRequestPostCompile, aiRequestPreParse, aiRequestPostParse | Modify AI request data at each stage of the request. | SDK · Crowdin |
Integration and Automation
Section titled “Integration and Automation”| Module | Config key | Description | Docs |
|---|---|---|---|
| Project Integration | projectIntegration | Syncs files between a Crowdin project and an external service. | SDK · Crowdin |
| Workflow Step Type | workflowStepType | Custom step type in Crowdin Enterprise workflows. | SDK · Crowdin |
| Automation Action | automationAction | Action for Crowdin automations, with JSON Schema input and output. | — |
| Webhook | webhooks | Subscribes to project and organization events. | SDK · Crowdin |
| API | api | Endpoints for calling the app from outside Crowdin. | SDK · Crowdin |
| Auth Guard | authGuard | Extra authentication checks during user login. | SDK · Crowdin |
Example
Section titled “Example”Example of the Profile Menu module:
import crowdinModule from '@crowdin/app-project-module';
const configuration = { baseUrl: 'https://123.ngrok.io', clientId: 'clientId', clientSecret: 'clientSecret', name: 'Sample App', identifier: 'sample-app', description: 'Sample App description', dbFolder: import.meta.dirname, imagePath: import.meta.dirname + '/logo.png', profileResourcesMenu: [ { fileName: 'setup.html', uiPath: import.meta.dirname + '/public', environments: 'crowdin-enterprise' } ]};
crowdinModule.createApp(configuration);import crowdinModule from '@crowdin/app-project-module';import type { ClientConfig } from '@crowdin/app-project-module';
const configuration: ClientConfig = { baseUrl: 'https://123.ngrok.io', clientId: 'clientId', clientSecret: 'clientSecret', name: 'Sample App', identifier: 'sample-app', description: 'Sample App description', dbFolder: import.meta.dirname, imagePath: import.meta.dirname + '/logo.png', profileResourcesMenu: [ { fileName: 'setup.html', uiPath: import.meta.dirname + '/public', environments: 'crowdin-enterprise' } ]};
crowdinModule.createApp(configuration);Configuration
Section titled “Configuration”| Parameter | Description | Example |
|---|---|---|
imagePath | Path to the module logo (can be different image than the app logo). | import.meta.dirname + '/reports.png' |
fileName | Optional, only needed if file is not index.html. | 'reports.html' |
uiPath | Folder where UI of the module is located (js, html, css files). | import.meta.dirname + '/public' |
environments | Environment where the module should render. | crowdin / enterprise |
imageUrl | Alternative to imagePath to specify if logo is hosted remotely. | 'https://test.com/reports.png' |
Combining Modules
Section titled “Combining Modules”Each module can work as an extension to other modules, being something like a configuration UI for them:
import crowdinModule from '@crowdin/app-project-module';
const app = crowdinModule.express();
const configuration = { baseUrl: 'https://123.ngrok.io', clientId: 'clientId', clientSecret: 'clientSecret', name: 'Sample App', identifier: 'sample-app', description: 'Sample App description', dbFolder: import.meta.dirname, imagePath: import.meta.dirname + '/logo.png', profileResourcesMenu: [ { fileName: 'setup.html', uiPath: import.meta.dirname + '/public', environments: 'crowdin' } ], customMT: [ { translate } ], onUninstall: cleanup};
const crowdinApp = crowdinModule.addCrowdinEndpoints(app, configuration);const metadataStore = crowdinModule.metadataStore;
async function cleanup({ organization, allCredentials }) { // Cleanup logic await crowdinApp.deleteMetadata(organization);}
async function translate({ client, context, projectId, source, target, strings }) { const organization = context.jwtPayload.domain || context.jwtPayload.context.organization_id; const metadata = await metadataStore.getMetadata(organization); // do translation based on metadata const translations = ['hello', 'world']; return translations;}
// extra endpoints for resources UIapp.post('/metadata', async (req, res) => { // Always specify moduleKey to restrict access to authorized modules const { context } = await crowdinApp.establishCrowdinConnection({ jwtToken: req.query.jwtToken, moduleKey: ['sample-app-profile-resources'] // Only this module can access }); const id = `${context.jwtPayload.context.organization_id}_${context.jwtPayload.context.project_id}`; const organization = context.jwtPayload.domain || context.jwtPayload.context.organization_id; const metadata = await metadataStore.getMetadata(organization); await crowdinApp.saveMetadata({ id, metadata: req.body, crowdinId: organization }); res.status(204).end();});
app.get('/metadata', async (req, res) => { // Always specify moduleKey to restrict access to authorized modules const { context } = await crowdinApp.establishCrowdinConnection({ jwtToken: req.query.jwtToken, moduleKey: ['sample-app-profile-resources'] // Only this module can access }); const id = `${context.jwtPayload.context.organization_id}_${context.jwtPayload.context.project_id}`; const metadata = await metadataStore.getMetadata(id) || {}; res.status(200).send(metadata);});
app.listen(3000, () => console.log('Crowdin app started'));import crowdinModule from '@crowdin/app-project-module';import type { ClientConfig, OnUninstallHandler } from '@crowdin/app-project-module';import type { CustomMTTranslateHandler } from '@crowdin/app-project-module/modules/custom-mt';
const app = crowdinModule.express();
const cleanup: OnUninstallHandler = async ({ organization, allCredentials }) => { // Cleanup logic await crowdinApp.deleteMetadata(organization);};
const translate: CustomMTTranslateHandler = async ({ client, context, projectId, source, target, strings }) => { const organization = String(context.jwtPayload.domain || context.jwtPayload.context.organization_id); const metadata = await metadataStore.getMetadata(organization); // do translation based on metadata const translations = ['hello', 'world']; return translations;};
const configuration: ClientConfig = { baseUrl: 'https://123.ngrok.io', clientId: 'clientId', clientSecret: 'clientSecret', name: 'Sample App', identifier: 'sample-app', description: 'Sample App description', dbFolder: import.meta.dirname, imagePath: import.meta.dirname + '/logo.png', profileResourcesMenu: [ { fileName: 'setup.html', uiPath: import.meta.dirname + '/public', environments: 'crowdin' } ], customMT: [ { translate } ], onUninstall: cleanup};
const crowdinApp = crowdinModule.addCrowdinEndpoints(app, configuration);const metadataStore = crowdinModule.metadataStore;
// extra endpoints for resources UIapp.post('/metadata', async (req, res) => { // Always specify moduleKey to restrict access to authorized modules const { context } = await crowdinApp.establishCrowdinConnection({ jwtToken: req.query.jwtToken as string, moduleKey: ['sample-app-profile-resources'] // Only this module can access }); const id = `${context.jwtPayload.context.organization_id}_${context.jwtPayload.context.project_id}`; const organization = String(context.jwtPayload.domain || context.jwtPayload.context.organization_id); const metadata = await metadataStore.getMetadata(organization); await crowdinApp.saveMetadata({ id, metadata: req.body, crowdinId: organization }); res.status(204).end();});
app.get('/metadata', async (req, res) => { // Always specify moduleKey to restrict access to authorized modules const { context } = await crowdinApp.establishCrowdinConnection({ jwtToken: req.query.jwtToken as string, moduleKey: ['sample-app-profile-resources'] // Only this module can access }); const id = `${context.jwtPayload.context.organization_id}_${context.jwtPayload.context.project_id}`; const metadata = await metadataStore.getMetadata(id) || {}; res.status(200).send(metadata);});
app.listen(3000, () => console.log('Crowdin app started'));Read more about App Metadata.