1.0.4 • Published 1 year ago
angular-locales-generator v1.0.4
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.