1.0.1 • Published 5 years ago
honyak v1.0.1
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 :sparkles:.
How to use
$ npm i -g honyak
$ export GOOGLE_APPLICATION_CREDENTIALS=/path/to/service-account.json
$ honyak -i YOUR_FILE_PATH -l jaSince this library leverages Google Translate API, this requires Google service account (GOOGLE_APPLICATION_CREDENTIALS).
Please refer to Google documentation regarding the service account key.
:link: https://cloud.google.com/translate/docs/setup.
Options
-i- (Required) Input file path (
.json,.yaml,.ymlare supported).
- (Required) Input file path (
-o- (Optional) Output file path. Default is
output.jsonoroutput.yamldepending on its input.
- (Optional) Output file path. Default is
-l- (Required) Target language you want to use. e.g.
ja,vi.
- (Required) Target language you want to use. e.g.
If you want to translate ./exmaple/en.json to Vietnamese, then
$ honyak -i example/en.json -l viNote
The current version is not supporting nested objects for both JSON and YAML formats.