A powerful Terminal User Interface (TUI) application for managing Flutter localization files in multiple formats. ZLocalz supports ARB, JSON, YAML, CSV, and TSV files, ensuring perfect synchronization between your source locale and target translations with automatic validation, fixing, and AI-powered translation capabilities.
Repository: github.com/bllfoad/zlocalz
โ ๏ธ Beta: ZLocalz is currently in beta and may have issues. If you run into problems, please open an issue via the CLI withzlocalz issue --newor visit the issues page at github.com/bllfoad/zlocalz/issues.
- ARB Files: Native Flutter Application Resource Bundle support
- JSON Files: Standard JSON localization format
- YAML Files: Hierarchical YAML with metadata support
- CSV/TSV: Multi-locale spreadsheet format for easy editing
- Auto-Detection: Automatically detects and handles mixed formats
- Detect missing keys, extra keys, duplicates, ICU errors, placeholder mismatches, and formatting issues
- Format-specific validation rules
- Cross-format compatibility checks
- Automatically fix common issues while preserving translations
- Format-aware corrections (JSON, YAML, CSV structure preservation)
- Configurable key ordering (source-mirror or alphabetical)
- Translate missing keys using Google Gemini with context awareness
- Preserve ICU message format and placeholders
- Domain glossary and style guidelines support
- 3-pane interface: file tree, key list, and inspector
- Format-specific syntax highlighting
- Multi-format diff viewer
- Batch operations across multiple formats
- Multi-step undo/redo for safe experimentation
- Export to different formats
- Git integration for change tracking
- Fully Automatic: Updates install automatically for patch/minor releases
- Smart Updates: Major version changes require user confirmation
- Background Process: Updates happen silently without interrupting workflow
- Manual Control:
zlocalz updatefor immediate updates - Configurable: Disable with
"autoUpdate": falsein config - Welcome Messages: Shows what's new after auto-updates
npm install -g zlocalzSimply run zlocalz without any arguments to launch the interactive setup wizard:
zlocalzThe setup wizard will:
- Detect existing localization files automatically
- Guide you through configuration options
- Create
zlocalz.config.jsonand.envfiles - Launch the TUI interface when complete
Alternatively, create a configuration file zlocalz.config.json manually:
{
"flutterLocalesPath": "lib/l10n/",
"sourceLocale": "en",
"targetLocales": ["es", "fr", "de"],
"fileFormat": "auto",
"autoUpdate": true,
"doAutoFix": true,
"translateMissing": true,
"geminiModel": "gemini-2.5-pro",
"preferOrder": "mirror-source"
}Note:
autoUpdatedefaults totrue. Set tofalseto disable automatic updates and receive notifications instead.
ARB (Application Resource Bundle):
lib/l10n/app_en.arb
lib/l10n/app_es.arb
JSON:
locales/en.json
locales/es.json
YAML:
i18n/en.yml
i18n/es.yml
CSV (Multi-locale in one file):
translations.csv:
key,en,es,fr
welcome,"Welcome!","ยกBienvenido!","Bienvenue!"
- Set your Gemini API key:
export GEMINI_API_KEY="your-api-key"- Launch ZLocalz:
# Interactive setup (first-time users)
zlocalz
# Auto-detect format and launch TUI
zlocalz scan
# Specify format explicitly
zlocalz scan --format json
zlocalz scan --format yaml
zlocalz scan --format csv
# Command-line mode
zlocalz scan --no-tuiThe interactive setup wizard (zlocalz without arguments) provides:
- Automatically scans common Flutter localization directories (
lib/l10n,assets/l10n, etc.) - Detects existing file formats (ARB, JSON, YAML, CSV, TSV)
- Suggests optimal configuration based on your project structure
- Basic Setup: Path, format, source/target locales
- Advanced Options: Auto-fix settings, key ordering preferences
- AI Translation: Optional Google Gemini integration with API key management
- Format-Specific: CSV delimiter and column configuration
- Creates
zlocalz.config.jsonwith your preferences - Securely stores API keys in
.envfile - Automatically adds
.envto.gitignore - Validates all inputs with helpful error messages
- Automatically launches TUI interface after setup
- Shows configuration summary and next steps
- Provides helpful tips for using ZLocalz effectively
โ/โ- Focus panesโ/โ- Move selectionTab- Cycle panes
/- Global searchf- Filter menu*- Toggle "only issues"
a- Auto-fix selectedt- Translate selectedd- View diffe- Edit valuem- Edit metadataSpace- Select/deselect keyA- Select all visible
S- Save changesP- Copy patchu- UndoCtrl+r- Redo
:- Open command palette?- Show helpq- Quit
zlocalz scan --path lib/l10n --source en --targets es frzlocalz fixzlocalz translate --key YOUR_GEMINI_API_KEYzlocalz scan --no-tui > report.json# Open issues page
zlocalz issue
# Open new issue form
zlocalz issue --newflutterLocalesPath: Path to your Flutter localization filessourceLocale: The reference locale (e.g., "en")targetLocales: Array of target locale codes
doAutoFix: Enable automatic fixes (default: false)translateMissing: Enable AI translation (default: false)geminiModel: Gemini model to use (default: "gemini-2.5-pro")styleGuidelines: Translation style rulesdomainGlossary: Key-value pairs for consistent translationsdoNotTranslate: Tokens to preserve (e.g., brand names)preferOrder: "mirror-source" or "alphabetical"
- Scan: Open TUI and review validation issues
- Filter: Use
fto filter by issue type - Select: Space to select affected keys
- Fix: Press
ato auto-fix selected issues - Translate: Press
tto translate missing keys - Review: Use diff view (
d) to review changes - Save: Press
Sto write changes to disk
ZLocalz generates a comprehensive JSON report with:
- Issue summary by type and locale
- Applied fixes with descriptions
- Translation results with safety checks
- Unified diff patches
- Ready-to-commit file contents
- Fix bugs and improve stability across all supported formats
- TUI visual upgrade: modern themes, layout polish, accessibility, and mouse support
- Add new features based on community feedback (filters, reports, bulk ops)
- First-class Next.js support (integrate with Next.js i18n config and file structures)
We are open to collaboration and welcome contributions of all sizes. Ways you can help:
- Improve stability by fixing bugs
- Make the TUI look great with better UX, theming, and accessibility
- Add features that make workflows faster and safer
- Implement and refine Next.js support
How to collaborate:
- Fork the repo: github.com/bllfoad/zlocalz
- Create a branch:
git checkout -b feat/your-feature - Install dependencies:
npm install - Run in dev mode:
npm run dev - Build locally:
npm run build - Lint and test:
npm run lintandnpm test - Open a Pull Request with a clear description and screenshots when relevant
For discussions, ideas, or questions, please open an issue in the repository.
MIT