当前位置: 首页 > news >正文

translate-shell的使用方法

translate-shell的使用方法

使用方法

1.下载
2.执行chmod +x ./trans添加权限
3.使用./trans helloworld
输出

helloworld

你好,世界
(Nǐ hǎo, shìjiè)

helloworld 的翻译
[ English -> 简体中文 ]

helloworld
    你好,世界, 你好世界, 的HelloWorld

相关命令

相关命令,可以查看帮助trans -help

Usage:  trans [OPTIONS] [SOURCES]:[TARGETS] [TEXT]...

Information options:
    -V, -version
        Print version and exit.
    -H, -help
        Print help message and exit.
    -M, -man
        Show man page and exit.
    -T, -reference
        Print reference table of languages and exit.
    -R, -reference-english
        Print reference table of languages (in English names) and exit.
    -L CODES, -list CODES
        Print details of languages and exit.
    -S, -list-engines
        List available translation engines and exit.
    -U, -upgrade
        Check for upgrade of this program.

Translator options:
    -e ENGINE, -engine ENGINE
        Specify the translation engine to use.

Display options:
    -verbose
        Verbose mode. (default)
    -b, -brief
        Brief mode.
    -d, -dictionary
        Dictionary mode.
    -identify
        Language identification.
    -show-original Y/n
        Show original text or not.
    -show-original-phonetics Y/n
        Show phonetic notation of original text or not.
    -show-translation Y/n
        Show translation or not.
    -show-translation-phonetics Y/n
        Show phonetic notation of translation or not.
    -show-prompt-message Y/n
        Show prompt message or not.
    -show-languages Y/n
        Show source and target languages or not.
    -show-original-dictionary y/N
        Show dictionary entry of original text or not.
    -show-dictionary Y/n
        Show dictionary entry of translation or not.
    -show-alternatives Y/n
        Show alternative translations or not.
    -w NUM, -width NUM
        Specify the screen width for padding.
    -indent NUM
        Specify the size of indent (number of spaces).
    -theme FILENAME
        Specify the theme to use.
    -no-theme
        Do not use any other theme than default.
    -no-ansi
        Do not use ANSI escape codes.
    -no-autocorrect
        Do not autocorrect. (if defaulted by the translation engine)
    -no-bidi
        Do not convert bidirectional texts.
    -bidi
        Always convert bidirectional texts.
    -no-warn
        Do not write warning messages to stderr.
    -dump
        Print raw API response instead.

Audio options:
    -p, -play
        Listen to the translation.
    -speak
        Listen to the original text.
    -n VOICE, -narrator VOICE
        Specify the narrator, and listen to the translation.
    -player PROGRAM
        Specify the audio player to use, and listen to the translation.
    -no-play
        Do not listen to the translation.
    -no-translate
        Do not translate anything when using -speak.
    -download-audio
        Download the audio to the current directory.
    -download-audio-as FILENAME
        Download the audio to the specified file.

Terminal paging and browsing options:
    -v, -view
        View the translation in a terminal pager.
    -pager PROGRAM
        Specify the terminal pager to use, and view the translation.
    -no-view, -no-pager
        Do not view the translation in a terminal pager.
    -browser PROGRAM
        Specify the web browser to use.
    -no-browser
        Do not open the web browser.

Networking options:
    -x HOST:PORT, -proxy HOST:PORT
        Use HTTP proxy on given port.
    -u STRING, -user-agent STRING
        Specify the User-Agent to identify as.
    -4, -ipv4, -inet4-only
        Connect only to IPv4 addresses.
    -6, -ipv6, -inet6-only
        Connect only to IPv6 addresses.

Interactive shell options:
    -I, -interactive, -shell
        Start an interactive shell.
    -E, -emacs
        Start the GNU Emacs front-end for an interactive shell.
    -no-rlwrap
        Do not invoke rlwrap when starting an interactive shell.

I/O options:
    -i FILENAME, -input FILENAME
        Specify the input file.
    -o FILENAME, -output FILENAME
        Specify the output file.

Language preference options:
    -l CODE, -hl CODE, -lang CODE
        Specify your home language.
    -s CODES, -sl CODES, -source CODES, -from CODES
        Specify the source language(s), joined by '+'.
    -t CODES, -tl CODES, -target CODES, -to CODES
        Specify the target language(s), joined by '+'.

Text preprocessing options:
    -j, -join-sentence
        Treat all arguments as one single sentence.

Other options:
    -no-init
        Do not load any initialization script.

See the man page trans(1) for more information.

参考资料

命令行版谷歌翻译:Translate Shell
translate-shell

相关文章:

  • ksnapshot使用
  • 报数count-and-say
  • 递归需要遵守的重要规则
  • 组合总和(combination-sum)
  • 组合总和combination-sum
  • 如何查看隐藏的密码(限chrome浏览器)
  • 最大子序和(maximum-subarray)——动态规划和贪心双解法
  • Deepin系统安装SSH服务
  • Deepin Gif转mp4
  • 零钱兑换(coin-change) 动态规划问题
  • 批量识别图版中的文字信息之百度AI文字识别
  • 操作系统 术语表
  • GoldenDict 调用百度翻译(多段文本)
  • Hexo常用命令
  • 最小路径和(minimum-path-sum)
  • 【108天】Java——《Head First Java》笔记(第1-4章)
  • 0x05 Python数据分析,Anaconda八斩刀
  • angular2 简述
  • HTTP那些事
  • Java的Interrupt与线程中断
  • JS字符串转数字方法总结
  • Redis字符串类型内部编码剖析
  • RxJS 实现摩斯密码(Morse) 【内附脑图】
  • Solarized Scheme
  • 记录:CentOS7.2配置LNMP环境记录
  • 每天10道Java面试题,跟我走,offer有!
  • 软件开发学习的5大技巧,你知道吗?
  • 扫描识别控件Dynamic Web TWAIN v12.2发布,改进SSL证书
  • Nginx实现动静分离
  • #{}和${}的区别?
  • #Z2294. 打印树的直径
  • #我与Java虚拟机的故事#连载03:面试过的百度,滴滴,快手都问了这些问题
  • (02)Hive SQL编译成MapReduce任务的过程
  • (16)UiBot:智能化软件机器人(以头歌抓取课程数据为例)
  • (MIT博士)林达华老师-概率模型与计算机视觉”
  • (NSDate) 时间 (time )比较
  • (动手学习深度学习)第13章 计算机视觉---微调
  • (附源码)ssm基于jsp的在线点餐系统 毕业设计 111016
  • (六)Hibernate的二级缓存
  • (一)Mocha源码阅读: 项目结构及命令行启动
  • (已解决)什么是vue导航守卫
  • (译) 理解 Elixir 中的宏 Macro, 第四部分:深入化
  • (转)C#开发微信门户及应用(1)--开始使用微信接口
  • (转)EOS中账户、钱包和密钥的关系
  • (转)拼包函数及网络封包的异常处理(含代码)
  • (最全解法)输入一个整数,输出该数二进制表示中1的个数。
  • .NetCore部署微服务(二)
  • .Net小白的大学四年,内含面经
  • ;号自动换行
  • @Valid和@NotNull字段校验使用
  • [ai笔记3] ai春晚观后感-谈谈ai与艺术
  • [boost]使用boost::function和boost::bind产生的down机一例
  • [C#基础知识系列]专题十七:深入理解动态类型
  • [C++]AVL树怎么转
  • [CISCN 2019华东南]Web11