Automated translation system using the MyMemory API to generate all missing translations from intl_en.arb.
cd python
chmod +x setup.sh
./setup.shsource venv/bin/activatepython translate_all.pypython translate_all.py --languages fr de espython translate_all.py --dry-run- ✅ Uses the free MyMemory API (1000 requests/day, no signup required)
- ✅ Rate limited to be respectful to the free service
- ✅ Discovers languages dynamically from
lib/l10n/intl_*.arbfiles - ✅ Preserves existing translations (only adds missing ones)
- ✅ Handles metadata keys correctly
- ✅ Rejects low-quality translation-memory artifacts and mojibake
The script discovers all ARB files automatically. Current supported languages include:
- Arabic (ar), Bengali (bn), German (de), Spanish (es)
- Finnish (fi), French (fr), Gujarati (gu), Hebrew (he)
- Hindi (hi), Indonesian (id), Kannada (kn), Korean (ko)
- Nepali (ne), Pashto (ps), Punjabi (pa), Polish (pl)
- Portuguese (pt), Russian (ru), Slovak (sk), Swahili (sw)
- Telugu (te), Turkish (tr), Urdu (ur), Chinese (zh)
To add a new language, create an empty lib/l10n/intl_<code>.arb file and run the script.
The script will:
- Analyze missing keys in each language file
- Translate missing keys using the MyMemory API
- Update language files with new translations
- Create backups of original files
After completion, run flutter gen-l10n to regenerate Flutter localization files.