Automated i18n with FREE translation options โ 15+ translation methods (12 free!), 37 languages, offline mode, multiple export formats, and more.
- ๐ 12 Free Translation Methods โ No billing required!
- ๐ Offline Translation โ Built-in dictionaries, no internet needed
- ๐จ Creative Modes โ Pig Latin, Emoji, L33t, Morse Code, NATO phonetic
- ๐ Statistics & Cost Estimation โ Plan before you translate
- ๐ฆ Multiple Export Formats โ XLIFF, PO/gettext, CSV, Android, iOS, ARB
- ๐ Watch Mode โ Auto-translate during development
- ๐งช Pseudo-localization โ Test UI with fake translations
- ๐พ Translation Memory โ Reuse translations with fuzzy matching
- ๐ Enhanced Security โ API keys never exposed in logs
# Install globally
npm install -g multilingual-cli
# Initialize in your project
multilingual init
# Or use directly with npx
npx multilingual-cli init| Service | Description | Limit |
|---|---|---|
| MyMemory | Crowd-sourced + machine translation (recommended) | 10k chars/day (100k with email) |
| LibreTranslate | Open source, self-hostable | Unlimited |
| Lingva | Privacy-focused (may be blocked by Cloudflare) | Unlimited |
| Service | Description | Use Case |
|---|---|---|
| Dictionary | Built-in dictionaries for 10 languages | Quick translations, no API |
| Local | Use your own JSON translation files | Custom terminology |
| Service | Description | Example |
|---|---|---|
| Pseudo | Fake translations with accents | [แธคแธลลล แบลลลแธ~~~] |
| Piglatin | Classic word game | ellohay orldway |
| Emoji | Words โ emojis | ๐ ๐ |
| Leet | L33t sp34k | h3ll0 w0rld |
| Reverse | Reversed text | dlrow olleh |
| Mirror | Unicode mirror chars | ๊ญโ
๊คOW Oโ
โ
ฦH |
| Morse | Morse code | .... . .-.. .-.. --- |
| NATO | NATO phonetic alphabet | Hotel Echo Lima Lima Oscar |
| Uppercase | ALL CAPS | HELLO WORLD |
| Service | Description | Free Tier |
|---|---|---|
| DeepL | High quality neural translation | 500k chars/month |
| Wide language support | 500k chars/month |
# Use free Lingva (recommended, no API key needed!)
multilingual translate-file -s en.json -o ./locales --service lingva
# Use offline dictionary (no internet required!)
multilingual translate-file -s en.json -o ./locales --service dictionary
# Fun: translate to Pig Latin
multilingual translate-file -s en.json -o ./locales --service piglatin
# View all service options
multilingual servicesmultilingual init # Interactive setup wizard
multilingual run # Scan & translate project
multilingual scan # Scan only, show strings
multilingual translate-file # Translate existing JSON file# Export to XLIFF for translation tools
multilingual export -i en.json -o translations.xliff -f xliff
# Import translated XLIFF
multilingual import -i translated.xliff -o fr.json
# Supported formats: xliff, xliff2, po, csv, android, ios, arbmultilingual watch # Auto-translate on file changes
multilingual pseudo -s en.json # Generate pseudo-translations
multilingual stats # View statistics & cost estimatesmultilingual config --show # View current config
multilingual config --edit # Interactive config editor
multilingual config --set key=value
multilingual services # List all translation services
multilingual languages # List all 37 supported languages| ๐บ๐ธ English | ๐ช๐ธ Spanish | ๐ซ๐ท French | ๐ฉ๐ช German |
| ๐ฎ๐น Italian | ๐ต๐น Portuguese | ๐ง๐ท Portuguese (BR) | ๐ท๐บ Russian |
| ๐จ๐ณ Chinese (Simplified) | ๐น๐ผ Chinese (Traditional) | ๐ฏ๐ต Japanese | ๐ฐ๐ท Korean |
| ๐ธ๐ฆ Arabic (RTL) | ๐ฎ๐ณ Hindi | ๐ณ๐ฑ Dutch | ๐ต๐ฑ Polish |
| ๐ธ๐ช Swedish | ๐ฉ๐ฐ Danish | ๐ซ๐ฎ Finnish | ๐ณ๐ด Norwegian |
| ๐น๐ท Turkish | ๐จ๐ฟ Czech | ๐ฌ๐ท Greek | ๐ฎ๐ฑ Hebrew (RTL) |
| ๐ญ๐บ Hungarian | ๐ฎ๐ฉ Indonesian | ๐ฒ๐พ Malay | ๐น๐ญ Thai |
| ๐ป๐ณ Vietnamese | ๐บ๐ฆ Ukrainian | ๐ง๐ฌ Bulgarian | ๐ท๐ด Romanian |
| ๐ธ๐ฐ Slovak | ๐ธ๐ฎ Slovenian | ๐ช๐ช Estonian | ๐ฑ๐ป Latvian |
| ๐ฑ๐น Lithuanian |
| Format | Extension | Use Case |
|---|---|---|
| JSON | .json |
Web apps, Node.js |
| XLIFF 1.2 | .xliff |
Translation tools (SDL, Trados) |
| XLIFF 2.0 | .xliff |
Modern CAT tools |
| PO/gettext | .po |
Linux, WordPress, Python |
| CSV | .csv |
Spreadsheets, bulk editing |
| Android | strings.xml |
Android apps |
| iOS | .strings |
iOS/macOS apps |
| ARB | .arb |
Flutter apps |
# Convert JSON to XLIFF for professional translators
multilingual export -i en.json -o translations.xliff -f xliff
# Import back from translated XLIFF
multilingual import -i es.xliff -o es.jsonTest your UI's i18n readiness with fake translations:
# Generate pseudo-translations
multilingual pseudo -s en.json -o pseudo.jsonBefore: "Hello World"
After: "[แธคแธลลล แบลลลแธ~~~]"
This helps you:
- โ Find hardcoded strings
- โ Test text expansion (~30% longer)
- โ Verify special character support
- โ Identify concatenated strings
multilingual stats --reportโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Translation Statistics Report โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฃ
๐ SUMMARY
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Total strings: 245
Total words: 1,847
Total characters: 12,456
Overall coverage: 78.3%
๐ LANGUAGE COVERAGE
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ
Spanish [โโโโโโโโโโโโโโโโโโโโ] 100.0%
๐ French [โโโโโโโโโโโโโโโโโโโโ] 72.3%
โณ German [โโโโโโโโโโโโโโโโโโโโ] 23.1%
๐ฐ COST ESTIMATES
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
DeepL Free tier: ~0.4 months of quota
Google Free tier: ~0.4 months of quota
โ
Within free tier limits for both services
multilingual github --setupAutomatically translate on every push:
# .github/workflows/translate.yml
name: Auto-translate
on:
push:
paths:
- 'src/**'
- 'locales/en.json'
jobs:
translate:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
- run: npm install -g multilingual-cli
- run: multilingual run --auto
env:
TRANSLATION_API_KEY: ${{ secrets.TRANSLATION_API_KEY }}
- uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: 'chore: update translations'import Multilingual, {
TranslationManager,
calculateStats,
exportToFile,
XLIFFFormat
} from 'multilingual-cli';
// Basic usage
const ml = new Multilingual({
config: {
sourceLanguage: 'en',
targetLanguages: ['es', 'fr', 'de'],
translationService: 'none', // Use free service instead
}
});
// Use free translation service
const manager = new TranslationManager();
manager.setExtendedService('libretranslate'); // No API key needed!
const result = await manager.translate('Hello World', 'es', 'en');
console.log(result.text); // "Hola Mundo"
// Pseudo-translation for testing
const pseudo = manager.generatePseudoTranslation('Hello World');
console.log(pseudo); // "[แธคแธลลล แบลลลแธ~~~]"
// Export to XLIFF
const doc = {
sourceLanguage: 'en',
targetLanguage: 'es',
units: [
{ key: 'greeting', source: 'Hello', target: 'Hola' },
{ key: 'farewell', source: 'Goodbye', target: 'Adiรณs' },
]
};
const xliff = XLIFFFormat.export(doc);API keys are never exposed:
- โ
Keys masked in logs (
AIza****...****V8Isd3A) - โ Uses environment variables
- โ
.env.exampletemplate included - โ Keys never written to translation files
- โ Error messages sanitized
# Use environment variable
export TRANSLATION_API_KEY="your-key-here"
multilingual run --autoyour-project/
โโโ locales/
โ โโโ en.json # Source language
โ โโโ es.json # Auto-generated
โ โโโ fr.json # Auto-generated
โ โโโ ...
โโโ .multilingual/
โ โโโ translation-memory.json # Reusable translations
โ โโโ reports/ # Statistics reports
โโโ multilingual.config.json # Configuration
โโโ .env # API keys (git-ignored)
Contributions are welcome! Please read our contributing guidelines first.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
MIT License โ see LICENSE for details.
Attribution Required: Generated translation files must retain the multilingual-cli attribution comments.
- npm: npmjs.com/package/multilingual-cli
- GitHub: github.com/NagusameCS/Multilingual
- Documentation: NagusameCS.github.io/Multilingual
Built with โค๏ธ by developers, for developers