Skip to content

featbit/angular-locales-generator

Repository files navigation

angular-locales-generator

stars Node TypeScript GitHub Workflow Status

This is a command line util for generating or merging, if exists already, locale files for angular project using @angular/localize package. Only xlf format is supported.

Getting Started

Install

Use npm to install the package into your project

npm install angular-locales-generator --save-dev

In your package.json file, add the following command:

{
  "scripts": {
    "locales-generator": "locales-generator --l zh,fr --bp ./src/locale"
  }
}
  • locales: alias as l, the targeting locales, seperated by comma, mandatory
  • base-path: alias as bp, the directory where the translation files are stored, mandatory

Run

npm run locales-generator

or directly without adding scripts in your package.json file

npx locales-generator --l zh,fr --bp ./src/locale

Wait a while, locale files with name format messages.[locale].xlf should be generated under the base-path as specified above.

About

A handful util to generate or merging, if exists already, locale files for angular projects using @angular/localize package

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published