json_to_arb 0.1.0
json_to_arb: ^0.1.0 copied to clipboard
A Dart package to convert JSON localization files to ARB format.
json_to_arb #
A Dart command-line tool to convert multiple JSON localization files into ARB files for Flutter internationalization.
Usage #
-
Add your JSON files
Organize your localization files by language, e.g.:lib/l10n/en/app.json lib/l10n/ar/app.json -
Configure your project
In yourpubspec.yaml, add:arb_directories: source: lib/l10n output: lib/l10n/app_arb locales: - en - ar ... other locals -
Run the converter
Execute the tool from your project root:dart run json_to_arbThis will generate ARB files in the output directory.
Output #
- ARB files will be created for each language, e.g.:
lib/l10n/app_arb/app_en.arb lib/l10n/app_arb/app_ar.arb
Notes #
- Errors and warnings are printed in color for easy debugging.