google-translate-cn-api
功能
node.js 實現谷歌翻譯 api
命令行工具 command line
命令行工具 command line
全局安裝
npm install -g google-translate-cn-api
使用
translate hello world
# => 你好,世界
translate 你好,世界
# => hello world
# 自定義翻譯狀態
translate --to=cn hello world
translate --to=en 你好,世界
# 自定義翻譯狀態簡寫
translate -c hello world
translate -e 你好,世界
# 也可直接通過管道或重定向翻譯
echo hello world | translate
cat some.txt | translate
translate <
百度分享代碼,如果開啟HTTPS請參考李洋個人博客
每一天,每一秒,你所做的決定都會改變你的人生!