honyak

1.0.1 • Public • Published

Translator tool - honyak

This tool translates your localization file into whatever language you want to use! This aims to solve pains for developers to localize many files .

How to use

$ npm i -g honyak
$ export GOOGLE_APPLICATION_CREDENTIALS=/path/to/service-account.json
$ honyak -i YOUR_FILE_PATH -l ja

Since this library leverages Google Translate API, this requires Google service account (GOOGLE_APPLICATION_CREDENTIALS). Please refer to Google documentation regarding the service account key. 🔗 https://cloud.google.com/translate/docs/setup.

Options

  • -i
    • (Required) Input file path (.json, .yaml, .yml are supported).
  • -o
    • (Optional) Output file path. Default is output.json or output.yaml depending on its input.
  • -l
    • (Required) Target language you want to use. e.g. ja, vi.

If you want to translate ./exmaple/en.json to Vietnamese, then

$ honyak -i example/en.json -l vi

Note

The current version is not supporting nested objects for both JSON and YAML formats.

Readme

Keywords

none

Package Sidebar

Install

npm i honyak

Weekly Downloads

4

Version

1.0.1

License

MIT

Unpacked Size

5.8 kB

Total Files

7

Last publish

Collaborators

  • ngo275