gulp-i18n-compile2
v1.0.3
Published
Compilation of gulp-18n-extract files into language files for aurelia-i18n.
Downloads
2
Readme
gulp-i18n-compile2
This gulp tasks compiles the extract content from gulp-i18n-extract into language json files for Aurelia-i18n .
This task ist part of the i18n toolchain:
- [Tag](to be implemented) text nodes in HTML with an i18n key attribute
- Extract keys and values
- Translate
- Compile into language files for i18n like Aurelia-i18n
Installation
Install gulp-i18n-compile2
using npm into your local repository.
npm install gulp-i18n-compile2 --save-dev
Usage
Setup a gulp task i18n-compile
.
var gulp = require('gulp');
var i18n_compile = require('gulp-i18n-compile2');
var options = {
fileName: "translation.json",
defaultLanguage: "en"
};
gulp.task('i18n-compile', function() {
return gulp.src("lang/language.json")
.pipe(i18n_compile(options))
.pipe(gulp.dest("./locales"));
});