Giter VIP home page Giter VIP logo

formatjs-locale-generator's Introduction

FormatJS locale generator

This is a tool to generate locales for FormatJS like ones from locale-data folder from the polyfills.

You may need a locale that is absent or inaccurate there but it can be onerous to write them by hand. So this uses some source files to generate locales as the original ones are created but in a more appropriate format.

โš ๏ธ The currently supported Intl APIs are:

  • Intl.ListFormat
  • Intl.PluralRules
  • Intl.RelativeTimeFormat

Usage

Usage: formatjs-localegen [options] <files...>

Create locales for FormatJS

Options:
  -m <module>    Module to create locale for. If specified, there should be
                 only one input file
  -d <dir>       Output directory (default: "locale-data")
  -l <locale>    Locale code

The source files are YAML files like these ones (Esperanto). The Intl module gets inferred by the file name (see the example folder mentioned before). You can define it yourself by -m option and in this case you can provide only one file.

Building

The project uses Yarn.

git clone https://github.com/kotwys/formatjs-locale-generator
cd formatjs-locale-generator
yarn

The executable will be named dist/index.js.

formatjs-locale-generator's People

Contributors

kotwys avatar

Watchers

 avatar  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.