arb_excel_converter_tool 1.1.1 copy "arb_excel_converter_tool: ^1.1.1" to clipboard
arb_excel_converter_tool: ^1.1.1 copied to clipboard

A complete CLI tool to export Flutter ARB files to Excel for translators and import them back into your project.

πŸš€ ARB Excel Converter Tool #

Bridge the gap between developers and translators. Convert Flutter .arb localization files into Excel spreadsheets and back again with ease.


πŸ”„ The Full Localization Loop #

  1. Export: Generate an Excel sheet from your primary ARB file.
  2. Translate: Give the Excel sheet to your translators (no JSON knowledge required).
  3. Import: Convert the translated Excel sheet back into a valid ARB file.

✨ Features #

  • πŸ“¦ Two-Way Sync: Support for both export (ARB β†’ Excel) and import (Excel β†’ ARB).
  • πŸ” Metadata Support: Extracts and injects @description metadata to provide context for translators.
  • πŸ›‘οΈ Type Safety: Built with the latest excel 4.x standards for robust file handling.
  • 🎨 Pretty Formatting: Imported ARB files are automatically formatted with 2-space indentation.
  • πŸ’» Zero Config: Optimized for standard Flutter localization paths (lib/l10n/).

πŸ“¦ Installation #

This is a global command-line tool. Install it once and use it in any Flutter project:

dart pub global activate arb_excel_converter_tool

Note: Ensure your Dart SDK bin folder is in your system PATH to run the tool from anywhere.


πŸ“– How to Use #

Use the arb_tool command from your project root.

1. Export (ARB ➑️ Excel) #

Convert your source ARB file into a spreadsheet for translation.

# Default: Converts lib/l10n/app_en.arb ➑️ localization_export.xlsx
arb_tool export

# Custom paths
arb_tool export -i lib/l10n/intl_en.arb -o translations_v1.xlsx

2. Import (Excel ➑️ ARB) #

Bring translated strings back into your Flutter project.

# Default: Converts localization_export.xlsx ➑️ lib/l10n/app_en.arb
arb_tool import

# Custom paths (e.g., importing a specific language)
arb_tool import -i translations_es.xlsx -o lib/l10n/app_es.arb


πŸ›  Available Options #

Option Short Default (Export) Default (Import) Description
--input -i lib/l10n/app_en.arb localization_export.xlsx Path to source file.
--output -o localization_export.xlsx lib/l10n/app_en.arb Path/Name for result.
--help -h N/A N/A Show usage instructions.

πŸ“ Mapping Example #

Your metadata is preserved! The tool maps ARB structures to Excel columns like this:

ARB Key ARB Value @Description ➑️ Excel Columns
loginBtn "Sign In" "Button on login" Key

πŸ’‘ Troubleshooting #

  • "Command not found": You likely need to add the pub-cache bin to your PATH. On macOS/Linux, this is usually ~/.pub-cache/bin.
  • Empty Rows: The tool automatically skips empty rows or rows missing a "Key" during the import process.
  • Indentation: The tool enforces a 2-space JSON indentation to keep your git diffs clean.

🀝 Feedback & Issues #

I created this tool to make Flutter localization easier! If you find it helpful, please give it a Like on pub.flutter-io.cn.

Found a bug? Report it on GitHub.

Created by Mohit


3
likes
140
points
310
downloads

Publisher

unverified uploader

Weekly Downloads

A complete CLI tool to export Flutter ARB files to Excel for translators and import them back into your project.

Repository (GitHub)
View/report issues

Topics

#localization #l10n #arb #excel #converter

Documentation

API reference

License

MIT (license)

Dependencies

archive, args, excel

More

Packages that depend on arb_excel_converter_tool