Tag: 翻译

  • shell下的翻译命令Translate-shell, translate to any language from the command line

    shell下的翻译命令Translate-shell, translate to any language from the command line

    项目地址:https://github.com/soimort/translate-shell 另外一个项目地址:https://www.soimort.org/translate-shell/ 两种安装方法:1、git clone https://github.com/soimort/translate-shell && cd translate-shellmakesudo make install 2、apt-get install translate-shell 安装完成后,以下是常用命令: 1、查看支持语言类型:trans -T 2、翻译中文到英文:#trans :en 你好 你好(Nǐ hǎo) Hello Definitions of 你好[ 简体中文 -> English ] interjectionHello!你好!, 喂!Hi!嗨!, 你好!Hallo!你好! 你好Hello, Hi, Hello there 3、翻译一个文本文件:trans :en file:///home/sapoclay/gtrans.txt 4、交互模式:trans -shell en:es thanks 其他具体用法可以参考github官网,或者以下帮助文档:

  • linux shell下用uni2ascii 把 16进制格式的\uxxxx\uxxx unicode 转换为 UTF-8 中文

    linux shell下用uni2ascii 把 16进制格式的\uxxxx\uxxx unicode 转换为 UTF-8 中文

    原文: https://centos.pkgs.org/7/repoforge-x86_64/uni2ascii-4.18-1.el7.rf.x86_64.rpm.html 先下载: rpmforge-release http://ftp.tu-chemnitz.de/pub/linux/dag/redhat/el7/en/x86_64/rpmforge/RPMS/ (http://ftp.tu-chemnitz.de/pub/linux/dag/redhat/el7/en/x86_64/rpmforge/RPMS/rpmforge-release-0.5.3-1.el7.rf.x86_64.rpm) 安装:rpmforge-release rpm: # rpm -Uvh rpmforge-release*rpm 安装uni2ascii Install uni2ascii rpm package: # yum install uni2ascii # echo ‘\u73af\u5883\uff0c\u800c’ | ascii2uni -a U -q 环境,而