Supported Languages
Documenso currently supports the following languages:German
de
English
en (source)
French
fr
Spanish
es
Italian
it
Dutch
nl
Polish
pl
Portuguese (Brazil)
pt-BR
Japanese
ja
Korean
ko
Chinese
zh
Translation Workflow
For Translators
If you want to translate Documenso into a new language or improve existing translations:Join Crowdin
Visit the Documenso Crowdin project and request to join.
Translate strings
Use Crowdin’s interface to translate strings. Crowdin provides:
- Context for each string
- Translation suggestions
- Translation memory
- Quality checks
Translations are automatically synced from Crowdin to the GitHub repository, so you don’t need to create pull requests for translations.
For Developers
If you’re adding new features or content that needs translation:Using Lingui in Code
JSX Translations
For translating strings in JSX, use the<Trans> component:
TypeScript Translations
For translating strings in TypeScript code, use thet macro:
Translations with Variables
You can include variables in translations:Pluralization
Handle plurals correctly:Translation File Structure
Translations are stored in PO (Portable Object) files:PO File Format
PO files contain translation entries:Working with Translation Commands
Extract Translations
Extract new strings from the codebase:- Scans all source files for Lingui macros
- Updates the English source catalog (
en/web.po) - Cleans up unused translations
Compile Translations
Compile PO files to optimized JavaScript:- Converts PO files to JS modules
- Optimizes for production use
- Must be run before building the app
Full Translation Update
Run both extract and compile:Lingui Configuration
The translation system is configured inlingui.config.ts:
Crowdin Integration
Crowdin automatically syncs translations with the repository:Crowdin Configuration
Thecrowdin.yml file defines how translations sync:
How It Works
- Developer adds new strings → Strings extracted to
en/web.po - PR merged to main → Crowdin detects new strings
- Translators translate → Strings translated in Crowdin
- Automatic sync → Crowdin creates PR with translations
- Maintainer merges → Translations available in app
Best Practices
Writing Translatable Strings
Keep strings concise
Keep strings concise
Shorter strings are easier to translate and fit better in different layouts.
Avoid string concatenation
Avoid string concatenation
Don’t concatenate strings as word order varies by language.
Provide context
Provide context
Add comments to help translators understand context.
Use placeholders for dynamic content
Use placeholders for dynamic content
Keep dynamic values outside the translatable string.
Testing Translations
-
Test with pseudo-localization to catch layout issues:
- Test actual translations by switching languages in the app
- Check for truncation - make sure UI handles longer translations
- Verify placeholders - ensure variables display correctly
Adding a New Language
To add support for a new language:Troubleshooting
Missing Translations
Problem: Strings appear in English instead of the selected language Solution:- Check if translations exist in the PO file
- Run
npm run translate:compile - Restart the development server
Outdated Catalogs
Problem: New strings not appearing in Crowdin Solution:- Run
npm run translate:extract - Commit and push the updated
en/web.pofile - Wait for Crowdin to sync (usually automatic)
Build Errors
Problem: Build fails with translation errors Solution:Resources
Lingui Documentation
Official Lingui documentation
Crowdin Project
Join the translation team
Discord Community
Get help from the community
Translation Files
View translation files on GitHub
Need Help?
If you have questions about translations:- Ask in the
#translationschannel on Discord - Open an issue on GitHub
- Review the Lingui documentation
