Internationalization & Localization
Trezor Suite provides comprehensive internationalization (i18n) support, allowing users worldwide to use the application in their native language.Translation System
Suite uses react-intl for all in-app localization:Message Definitions
Centralized message catalog in TypeScript
Crowdin Integration
Collaborative translation platform for translators
Type Safety
TypeScript ensures correct message usage
Rich Formatting
Support for plurals, variables, and formatting
Message Definitions
All translatable messages defined in a single source:Message Structure
| Field | Required | Description |
|---|---|---|
id | Yes | Unique identifier (must match object key) |
defaultMessage | Yes | English text shown until translated |
description | No | Context for translators |
dynamic | No | true for programmatically constructed keys |
Naming Conventions
ID Format
ID Format
- Use
TR_prefix for all message IDs - Optionally add scope:
TR_ONBOARDING_WELCOME - Use uppercase with underscores
- Must match object key exactly
Default Message
Default Message
- Write in clear, simple English
- Avoid technical jargon where possible
- Keep consistent tone and voice
- Source for all translations
Description
Description
- Provide context when meaning is ambiguous
- Explain where/how message is used
- Note any technical constraints (character limits)
- Optional but recommended
Usage in Components
Translation Component
For JSX elements:Translation Hook
For string values:Advanced Formatting
Variables
Dynamic content insertion:Pluralization
ICU MessageFormat for plural forms:Rich Text
Embed React components:Number & Date Formatting
Localized formatting:Crowdin Workflow
Translation Platform
Suite uses Crowdin for collaborative translation:Commands
Yarn scripts for Crowdin operations:Automated Sync
GitHub Actions automate translation updates:- Navigate to Crowdin translations update
- Trigger manual job with base branch
develop - Action creates PR titled “Crowdin translations update”
- Review and merge PR
Authentication
Crowdin CLI requires API token:Supported Languages
Suite is available in multiple languages:- Official Languages
- Community Languages
- English (en)
- Czech (cs)
- Spanish (es)
- French (fr)
- German (de)
- Italian (it)
- Japanese (ja)
- Portuguese (pt)
- Russian (ru)
Translation Files
Translated strings stored as JSON:JSON Format
Loading Translations
Translations loaded at application startup:Best Practices
For Developers
For Developers
- Add description for ambiguous messages
- Use variables instead of concatenation
- Test with long translations (German, Russian)
- Use semantic message IDs
- Never hardcode user-facing strings
- Always use Translation component or hook
For Translators
For Translators
- Maintain consistent terminology
- Preserve variable placeholders
- Respect plural forms in your language
- Keep formatting tags intact
- Ask for context if unclear
- Test translations in actual UI
For Reviewers
For Reviewers
- Verify all new messages have descriptions
- Check for duplicate messages
- Ensure IDs follow naming conventions
- Test with pseudo-localization
- Review Crowdin sync PRs carefully
Testing Translations
Pseudo-localization
Test UI with expanded text:Missing Translations
Fallback to English:Performance
Lazy Loading
Translations loaded on demand:Bundle Size
Optimization strategies:- Only include necessary languages in build
- Use code splitting for locale-specific features
- Minify translation JSON files
- Cache loaded translations
Troubleshooting
Message Not Translating
Message Not Translating
- Check message ID is correct
- Verify translation exists in JSON
- Confirm correct locale is loaded
- Clear app cache and reload
Crowdin Upload Fails
Crowdin Upload Fails
- Verify API token is valid
- Check master.json is generated
- Ensure JSON is valid
- Check Crowdin project permissions
Variables Not Replacing
Variables Not Replacing
- Check variable names match definition
- Verify values passed to Translation component
- Ensure variables in translated strings
- Test with English first