google-translate-tool
早上醒來沒事,寫個打發時間專案,順便向大神致敬 XD
Install
$ npm install -g google-translate-tool
Usage
$ google-translate --from=en --to=zh-TW Hello World
Output JSON format
$ google-translate --to=zh-TW --json --perty hello
Tips
We can create bash
alias to make our command meaningful.
Something like this
alias to-chinese='google-translate --to=zh-TW'
And then we can use to-chinese
to translate any language to chinese traditional.
$ to-chinese hello
License
MIT.