xlifftranslate-google-api
v1.0.2
Published
Translate xliff files using the Google Cloud Translation API
Downloads
70
Maintainers
Readme
xlifftranslate
Translate xliff files using the Google Cloud Translation API
How to use it
- Install globally with
npm install -g xlifftranslate
. - Follow the instructions at https://developers.google.com/identity/protocols/application-default-credentials to setup your google application credentials.
- Run
xlifftranslate
in your project directory.
Options
--i18nPath
specify the directory where the xliff files are found--verbose "true"
adds verbose output with translations.--ignoreText "ignoreme ignoremetoo"
ignores the specified strings with default delimiter " ".--ignoreDelimiter " "
Specify the delimiter for the --ignoreText option--skipDifferent "true"
Skip translations of strings where source and target don't match.
Examples
To run, make sure your Google Translate API KEY are in your environment:
export GOOGLE_API_KEY=YOUR_API_KEY
Example run command
xlifftranslate --i18nPath src/i18n