A tool that uses Google Translate API to translate template strings located in a JSON file while preserving handlebars style templates in English.
npm install translate-templates --save-dev
let translate = require('translate-templates')
translate(options)
options.apiKey
: API key for Google Translateoptions.outDir
: Directory where translations should gooptions.englishFile
: Path to the English file to translate fromoptions.locales
: An array of locales to translate to. Use any locale accepted by Google Translate.