2.2.0 • Published 4 years ago

translate-json v2.2.0

Weekly downloads
22
License
MIT
Repository
github
Last release
4 years ago

translate-json

npm version Tests tested with jest code style: prettier

Tool to translate strings in a JSON document.

Install

npm i -g translate-json

Usage

Usage:
  translate-json [options] -l <language> (- | <input>) [<output>]
  translate-json [options] --lang=<language> (- | <input>) [<output>]

Options:
  -t, --translator              The translation service to use: google (default), yandex, bing.
  -k, --api-key                 The API key to be used with the translation service.
  -p, --preserve-html-entities  Preserve HTML entities in translated text. (False by default.)
  -e, --exclude                 Regular expression to exclude key paths. e.g. '^(notThis|this|not.this.either)$'
  -d, --dry-run                 Do not actually translate any values, prefix strings with 'zz_' to mark them.
  -h, --help                    Show this screen.
  -v, --version                 Show version.
  --verbose                     Log more.

Examples:
  translate-json --lang=ru ./labels.json ./labels-ru.json
  translate-json -d --lang=ru ./labels.json ./labels-ru.json
  translate-json --preserve-html-entities --lang=ru ./labels.json ./labels-ru.json
  cat input.json | translate-json -l ru - > output.json
2.2.0

4 years ago

2.1.3

6 years ago

2.1.4

6 years ago

2.1.2

7 years ago

2.1.1

7 years ago

2.1.0

7 years ago

2.0.0

7 years ago

1.2.0

7 years ago

1.1.1

7 years ago

1.1.0

7 years ago

1.0.9

7 years ago

1.0.8

7 years ago

1.0.7

7 years ago

1.0.6

7 years ago

1.0.5

7 years ago

1.0.4

7 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago