Skip to content

Translate xliff files using the Google Cloud Translation API

License

Notifications You must be signed in to change notification settings

IlyesDemineExtVeolia/xlifftranslate

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

npm

xlifftranslate

Translate xliff files using the Google Cloud Translation API

How to use it

  1. Install globally with npm install -g xlifftranslate.
  2. Follow the instructions at https://developers.google.com/identity/protocols/application-default-credentials to setup your google application credentials.
  3. 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 Credendials are in your environment:

export GOOGLE_APPLICATION_CREDENTIALS=service_account.json

Example run command

xlifftranslate --i18nPath src/i18n

About

Translate xliff files using the Google Cloud Translation API

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%