gulp-combine-languagefiles
Gulp plugin to combine several (nested) JSON language files Create easily editable CSV so non-programmers can help with translations
This plugin was originally made to be used with gulp-bobrsass-boilerplate / angularjs, but it should work with other projects too using JSON key-value -pair translations. It expects translations to be named as en.json
, en-EN.json
or similar. Your project tree might look for example like
src/
app/
module1/
languages/
en.json
fi.json
module2/
languages/
en.json
fi.json
Usage
Install gulp-combine-languagefiles
as a development dependency:
npm install --save-dev gulp-combine-languagefiles
Add it to your gulpfile.js
:
var combine_languagefiles = ; gulp ;
You can use gulp-convert to convert result to CSV. Use includeHeader
parameter to prepend header as first row.
var concat_json = ;var convert = ; gulp ; // File will be saved as translations.csv to project root
See /example for a script to parse generated CSV back to original JSON-files, it even supports downloading CSV from Google Drive!