We use Lingo.dev to manage translations for 0.email. This document explains how our translation workflow operates.
Lingo.dev is an open-source CLI + AI Localization Engine that helps translate our product into multiple languages with great developer experience. It integrates directly with our development workflow through a CLI tool and GitHub Actions.
Our translation process is fully automated:
- Developers add or update content in the English source files (
en.json) - GitHub Actions automatically runs the Lingo.dev CLI on commits
- Lingo.dev's managed translation AI automatically generates translations for all target languages, taking into account translation memory and our product's context, configured in our Lingo.dev dashboard
- Updated translations are committed back to the repository
Here's an example of our i18n.json configuration:
{
"$schema": "https://lingo.dev/schema/i18n.json",
"version": 1.5,
"locale": {
"source": "en",
"targets": ["ar", "de", "es", "fr", "hi"]
},
"buckets": {
"json": {
"include": ["apps/mail/messages/[locale].json"]
}
}
}To add support for a new language:
- Add the language code to the
targetsarray ini18n.jsonin the project root - Also add the language to the i18n config in
apps/mail/i18n/config.ts - The GitHub Action will automatically generate missing translations when you commit these changes
When new phrases are added or updated in en.json, they will be automatically localized in all other languages through our GitHub Action workflow. The Lingo.dev CLI detects changes and only translates what's new or modified.
If you want to manually update a translation:
- Go to the non-English translation file (e.g.,
es.jsonfor Spanish,de.jsonfor German) - Find the key you want to update and change its value
- Commit the change to the repository
- Lingo.dev will remember this override and reuse it for future translations
Example:
// Before manual update in de.json
"welcomeMessage": "Willkommen bei 0.email"
// After manual update in de.json
"welcomeMessage": "Herzlich willkommen bei 0.email"Your manual override will be preserved during future translation runs, and Lingo.dev will learn from these changes to improve future translations.
We use the Lingo.dev GitHub Action to automate translations in our CI/CD pipeline. The action is configured to:
- Run automatically on push to feature branches
- Generate translations for any new or modified content
- Commit the updated translation files back to the repository, via a PR
This setup means developers only need to focus on maintaining the English source content. The translation process happens automatically in the background.
When updating translations manually, ensure:
- Variables remain intact: Placeholders like
{count},{email}must not be modified - Formatting tags are preserved: Tags like
<strong>,<em>should remain in the translated text - Plural forms are maintained: Structures like
{count, plural, =0 {files} one {file} other {files}}must keep their format
English source:
"attachmentCount": "{count, plural, =0 {attachments} one {attachment} other {attachments}}",The AI will translate only the words inside the curly braces while maintaining the structure.
If you have questions about translation or encounter issues, please open an issue or join our Discord server.
Thank you for helping make 0.email accessible to users in your language!