auto_localize_plus
π Automatically generate multi-language localization JSON files for Flutter & Dart projects.
Convert a single base file (like en.json) into multiple languages such as:
- Hindi (hi)
- Tamil (ta)
- Telugu (te)
- Kannada (kn)
- Malayalam (ml)
- Marathi (mr)
- Bengali (bn)
- Gujarati (gu)
- Punjabi (pa)
- And moreβ¦
Fast parallel translation included β‘
β¨ Features
β
Generate localization JSON automatically
β
Supports multiple languages
β
Fast parallel translation (batch processing)
β
CLI support (dart run auto_localize_plus)
β
Works with Flutter & Dart projects
β
Simple API
β
Easy integration
π¦ Installation
dart pub add auto_localize_plus
π Input File
Create your base localization file (example en.json) in your project:
your_project/
assets/
en.json
Example:
{
"hello": "Hello",
"welcome": "Welcome to the app",
"login": "Login"
}
π Usage (Dart API)
import 'package:auto_localize_plus/auto_localize_plus.dart';
Future<void> main(List<String> args) async {
await AutoLocalize.generate(
inputPath: 'assets/en.json',
outputDir: 'assets',
languages: ['hi', 'ta'],
);
}
π languages Parameter
In:
languages: ['hi', 'ta']
Add the language codes that you want to generate.
Example:
languages: ['hi', 'ta', 'te', 'kn']
This will generate:
assets/
hi.json
ta.json
te.json
kn.json
π CLI Usage
Run directly from terminal:
dart run auto_localize_plus
This command reads your base localization file and generates translated JSON files for the selected languages.
π Output Structure
After running:
assets/
en.json
hi.json
ta.json
te.json
π Supported Language Codes
Below are commonly used language codes:
| Language | Code |
|---|---|
| English | en |
| Hindi | hi |
| Tamil | ta |
| Telugu | te |
| Kannada | kn |
| Malayalam | ml |
| Marathi | mr |
| Bengali | bn |
| Gujarati | gu |
| Punjabi | pa |
| Odia | or |
| Assamese | as |
| Urdu | ur |
| Nepali | ne |
| Sinhala | si |
You can use any valid ISO language code supported by the translation engine.
Example:
languages: ['hi', 'bn', 'mr']
π― Perfect For
- Flutter apps
- Banking apps
- Enterprise apps
- Multi-language products
- Localization automation
β‘ Performance
Uses batch parallel translation for faster processing compared to sequential translation.
β€οΈ Contributing
Contributions are welcome!
If you find a bug or want a feature, please open an issue or submit a PR.
π License
MIT License
π¨βπ» Author
Developed with β€οΈ for the Flutter & Dart community.
β Support
If you find this package useful, please give it a star on GitHub β