All Projects → ShanaMaid → terminal-translate

ShanaMaid / terminal-translate

Licence: MIT license
a terminal-translate tool

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to terminal-translate

Translators
🌏🌍🌎Translators🌎🌍🌏 is a library which aims to bring free, multiple, enjoyable translation to individuals and students in Python. Translators是一个旨在用Python为个人和学生带来免费、多样、愉快翻译的库。
Stars: ✭ 295 (+304.11%)
Mutual labels:  translate, youdao, baidu
Chrome Extension Udemy Translate
Translate Udemy's subtitles into Chinese、English etc(Disneyplus+netflix+udemy+lynda+hulu+hbo now+primevideo)
Stars: ✭ 553 (+657.53%)
Mutual labels:  translate, youdao, baidu
kictor
A dictionary based on the console, 一个基于控制台的词典工具
Stars: ✭ 15 (-79.45%)
Mutual labels:  translate, youdao, iciba
web-translate
支持pdf和web的双击划词翻译脚本,当前使用爱词霸公共api
Stars: ✭ 43 (-41.1%)
Mutual labels:  translate, youdao, iciba
Mtrans
Multi-source Translation
Stars: ✭ 711 (+873.97%)
Mutual labels:  translate, youdao, baidu
Alfred Parrot
📝 一款可以多种语言翻译的 Alfred Workflow
Stars: ✭ 89 (+21.92%)
Mutual labels:  translate, youdao, baidu
gdict
A command line dictionary written in golang powered by multi engines.
Stars: ✭ 21 (-71.23%)
Mutual labels:  youdao, iciba
the-subway-of-china
中国地铁图
Stars: ✭ 104 (+42.47%)
Mutual labels:  translate, baidu
Many-Translaters
谷歌翻译,360翻译,iCIBA翻译,有道翻译,免费API
Stars: ✭ 121 (+65.75%)
Mutual labels:  youdao, iciba
baidu-translate-api
A free and unlimited API for Baidu Translate
Stars: ✭ 44 (-39.73%)
Mutual labels:  translate, baidu
MrTranslator
📘MrTranslator-A Translation Android APP
Stars: ✭ 16 (-78.08%)
Mutual labels:  translate, youdao
Dict
Chinese and English translation tools in the command line(命令行下中英文翻译工具)
Stars: ✭ 243 (+232.88%)
Mutual labels:  translate, youdao
Ydict
Yet another command-line youdao dictionary for geeks!
Stars: ✭ 318 (+335.62%)
Mutual labels:  translate, youdao
Chrome Extensions Youdaowithwordnode
有道词典chrome划词插件,原版不带生词本,在其源码基础上,添加了添加生词本的功能,生词本用的有道官方API
Stars: ✭ 74 (+1.37%)
Mutual labels:  translate, youdao
AlfredWorkflow YoudaoTranslate
alfred workflow,有道翻译
Stars: ✭ 20 (-72.6%)
Mutual labels:  translate, youdao
Mtranslate
A simple api for google translate
Stars: ✭ 222 (+204.11%)
Mutual labels:  translate
translation-google
A Google Translate component for Nodejs.
Stars: ✭ 42 (-42.47%)
Mutual labels:  translate
Traduzir Paginas Web
Translate your page in real time using Google or Yandex.
Stars: ✭ 214 (+193.15%)
Mutual labels:  translate
Yii2 Translate Manager
Translation Manager
Stars: ✭ 221 (+202.74%)
Mutual labels:  translate
po-auto-translation
translate PO files automatically for FREE using google translate
Stars: ✭ 33 (-54.79%)
Mutual labels:  translate

terminal-translate

build build download

NPM

命令行翻译工具,三大翻译引擎支持!

命令行英文报错怎么办?复制报错内容, tl一下即可!

一些注意事项

百度翻译引擎限制: 200W字符/月

有道翻译引擎限制: 1000次请求/时,申请了四个key,4000次请求/时

爱词霸翻译引擎限制: 无限制

当百度翻译引擎和有道翻译引擎的资源耗尽报错时,请使用tl -e iciba切换爱词霸翻译引擎!

如果使用量大,请自行申请API并更换配置文件中的key

翻译引擎支持

  • 百度翻译 - 支持多单词、多句子、单词句子混合翻译, 语言翻译方向最多, tl -l查看支持翻译语言
  • 有道翻译 - 只支持单句子或单词互译,
  • 爱词霸翻译 - 只支持单词或者短语翻译

工具默认使用有道翻译

...持续添加中

安装

npm install terminal-translate -g

帮助

指令tl 或者 translate

tl -h 查看帮助菜单

  Usage: translate
  a tearmail-transtalte tool!
  GithubID: ShanaMaid
  Repository: https://github.com/ShanaMaid/terminal-translate.git

  Options:

    -h, --help               output usage information
    -v, --version            show version
    -f, --baidu-from <from>  baidu engine: from language, default: auto
    -t, --baidu-to <to>      baidu engine: to language, default: zh
    -l, --baidu-language     baidu engine language
    -e, --engine <to>        change translate engine
    -c, --config             show config.json

使用手册

百度翻译引擎

百度翻译引擎默认翻译结果为中文

单纯需要了解单词或句子意思建议使用百度翻译,同时百度翻译支持多单词、多句子、单词句子混合翻译!

切换翻译引擎为百度翻译输入以下指令

tl -e baidu

修改百度翻译引擎语言翻译结果为英语,翻译结果不能修改auto

tl -t en

修改百度翻译引擎语言翻译起始语言为中文(不建议修改,默认值为auto,会自动检测)

tl -f zh

查看百度翻译引擎支持的语言翻译列表

tl -l

单个单词翻译

tl word

多个单词以空格分隔

tl apple book

句子翻译请以双引号包裹

tl "I love you, baby!"

单词句子混合同时翻译

tl apple book "I love you, baby!"

混合翻译

有道翻译引擎

有道翻译引擎适合用于学习了解单词意思,只支持单个单词或句子翻译,多个单词翻译会把单词集合判断为句子,句子翻译时无须像百度引擎一样用双引号包裹!

任何输入任何非中文的语言均会被翻译成中文,如果中文输入则会被翻译成英文

切换翻译引擎为有道翻译输入以下指令

tl -e youdao

单个单词翻译结果

句子翻译结果

中文句子翻译结果

爱词霸翻译引擎

切换爱词霸翻译引擎

tl -e iciba

爱词霸翻译引擎属于词典翻译,支持单个单词或者单词短语翻译,句子翻译时会报错!

  iciba can't translate sentences! 
  please use youdao or baidu!

版本更新记录

v1.0.4 翻译结果支持彩色显示,更加显眼瞩目

v1.0.3 支持爱词霸翻译引擎,新增3个有道翻译key

v1.0.2 支持有道翻译引擎,修复一些BUG

v1.0.1 支持百度翻译引擎

v1.0.0 发布

支持

如果工具有任何BUG或者你想提出改进建议,请提issue!

如果你对此工具非常满意不妨star或者打赏我请我喝一瓶脉动

声明

单词翻译结果样式参照了@偏右fanyi

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].