gulp-ng-json2translate
Plugin that wraps json
as an angular translate module.
Inspired by https://github.com/shahata/grunt-json-angular-translate.
What is the result?
See here
Install
npm install gulp-ng-json2translate
Usage
var gulp=; var json2translate=;var concat=; gulp;
options.moduleName
Type: Sting
Default: translations
The name of the generated AngularJS module.
options.extractLanguage
Type: Function
Custom function to retrieve language out of file name.
The default function can retrieve the language from files like that:
- message_en.json
- message-en.json
- message.en.json
options.hasPreferredLanguage
Type: Boolean
Default: true
The flag that indicates if there will be preferred language statement at the output file.
Tests
npm test
License
Licensed under the MIT license.