Code Monkey home page Code Monkey logo

excel_to_arb_generator's Introduction

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.

excel_to_arb_generator's People

Contributors

toe-lie avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.