xlf-google-translate
v1.0.4
Published
[](https://travis-ci.org/bpatrik/xlf-google-translate)
Readme
Deprecated, not supporting translation anymore since v1.0.0-beta.22
xlf-google-translate
It translates the Angular 2 i18n output with google translate
Features
It uses a *.xlf file as an input and translates the source tags of the xml with google translate and appends them to the xml as target.
It can extend existing translations. A good feature if new/additional text appear in the app.
Usage
- Run
npm run build - Edit the
config.jsto match your requirements - Run
npm run startand your files will be created
config example:
{
//source data and it language
"source": {
"lang": "en",
"file": ".../messages.xlf"
},
//desitnation folder and the laguages to translate
"destination": {
"folder": ".../src/locale",
"languages": ["hu","de"],
"filename": "messages"
},
//if extend, it does not override the already trasnlated parts
"method": "extend",
//replaces all line breaks, whitespaces with a single space
"formatOutput": true
}known bugs:
Can't handle variable in the source
