excel2arb 1.0.0 copy "excel2arb: ^1.0.0" to clipboard
excel2arb: ^1.0.0 copied to clipboard

A Dart package that allows you to download an Excel file from a given URL and generate ARB (Application Resource Bundle) files.

Excel to ARB Generator #

A Dart package that enables you to convert Excel files into ARB (Application Resource Bundle) files for localization.

Installation #

To activate the package, run the following command:

dart pub global activate excel2arb

Usage #

Once the package is activated, you can use the excel2arb command to convert Excel files to ARB files. Here's how:

excel2arb -u <excel-file-url> -s <sheet-name-to-parse> -o <path-to-arb-output-directory> -g <generate-l10n>

You can directly run a script from an activated package from the command line. If you are unable to run the script directly, you can also use dart pub global run.

dart pub global run excel2arb -u <excel-file-url> -s <sheet-name-to-parse> -o <path-to-arb-output-directory> -g <generate-l10n>
  • -u, --excel-url :               The URL of the Excel file to convert (e.g., https://example.com/sample.xlsx)
  • -s, --sheet-name :          The name of the sheet to parse (default: Localization)
  • -o, --output-directory :    The path to the directory where the ARB files will be generated (default: current directory)
  • -g, --gen-l10n :               Generate l10n files (default: false)

Example #

excel2arb -u https://example.com/sample.xlsx -s Localization -o output_dir -g true

Excel Sheet Format #

The supported Excel sheet format should have the following columns in the first row:

  • Feature (Optional)
  • Screen (Optional)
  • Name [name]
  • Description [description]
  • Remark (Optional)
  • Add localization columns using the local code in curly brackets,
    e.g., English {en}, Myanmar {my}, Thai {th}
  • Placeholders [placeholders] in Json format (Optional)

Make sure to use square brackets like [name] for keys and curly brackets like {en} for locale identifiers in your Excel sheet.

You can download and check the sample Excel sheet here.

Name [name] Description [description] Remark English {en} Myanmar {my} Thai {th} Placeholders [placeholders]
onboardingTitle Onboarding Title new line in some language Select language
to continue
ဘာသာစကားရွေးချယ်ပါ เลือกภาษา
signinTitle Sign In ဝင်ရောက်ရန်
formattedDepth Formatted depth value Depth {value} {unit} အနက် {value} {unit} {
"value": {
"type": "double",
"format": "decimalPattern",
"optionalParameters": {
"decimalDigits": 2
}
},
"unit": {
"type": "String"
}
}

Features #

  • Download Excel files from URLs
  • Generate ARB files for localization
  • Supports custom sheet names
  • Generates l10n files

Contributing #

Contributions are welcome! Feel free to open issues or pull requests on the GitHub repository.

3
likes
120
pub points
11%
popularity

Publisher

verified publishertoelie.dev

A Dart package that allows you to download an Excel file from a given URL and generate ARB (Application Resource Bundle) files.

Repository (GitHub)
View/report issues

Documentation

API reference

License

BSD-3-Clause (license)

Dependencies

args, equatable, excel, http, path

More

Packages that depend on excel2arb