i18n-formatter-cli
v0.1.1
Published
i18n automatization cli tool. Easily add keys, merge translation into an existing file, and create new locale files.
Readme
i18n-formatter-cli
cli tool for i18n library
Features
- Create new locale file with all keys from already existed file
- Add all keys from main locale file to all the others locales
- Merge translations from json to locale file
Instalation
npm i i18n-formatter-cli -DHow to use
After instalation you can check all the command by running $ i18n-cli --help;
- At first you need to create
.i18nfnrc.jsfile with fieldslocalesDir,mainLocaleandlocaleToMerge. For example:
module.exports = {
localesDir: './locales',
mainLocale: 'en-gb.json',
localeToMerge: './translation/externalTranslation.json'
}You can create .i18nfnrc.js by running
$ i18n-cli init- Try to use cli! Example:
$ i18n-cli init$ i18n-cli create fileName $ i18n-cli addAllKeys $ i18n-cli merge fileName1 fileName2 Restrictions
cli can work only with json files.
Thank you!
email: [email protected]
