0.0.2 • Published 8 years ago

gulp-i18n-formatter v0.0.2

Weekly downloads
2
License
ISC
Repository
github
Last release
8 years ago

#GULP-i18n-FORMATTER

##How to use ###install

npm install gulp-i18n-formatter --save-dev

###add to gulpfile

var i18nFormatter = require('gulp-i18n-formatter');

gulp.task('format-i18n', function() {
    gulp.src('./Locals.json')
        .pipe(i18nFormatter(['ru_RU', 'en_US']))
        .pipe(gulp.dest('./i18n/'));
});

##How its works ###Simply, its Converts this: Locals.json

{
    "TEST_TITLE": {
        "ru_RU": "Тестовый Заголовок",
        "en_US": "Testing Title"
     }
}

###Into this: ru_RU.json

{
    "TEST_TITLE": "Тестовый Заголовок"
}

en_US.json

{
    "TEST_TITLE": "Testing Title"
}

##Build and test ###To build package run:

npm start

###To test package run:

npm test