Linux 命令行使用google翻译
安装translate-shell
sudo apt install translate-shell
写个脚本
cat /opt/applications/bin/google-translate
#!/bin/bash
export http_proxy=http://127.0.0.1:8118
export https_proxy=http://127.0.0.1:8118
export ALL_PROXY=http://127.0.0.1:8118
if [ $# -ne 2 ]; then
echo "$0 <language(such as zh-CN, En)> <word>"
exit 255
fi
trans -e google -s auto -t $1 -show-original y -show-original-phonetics n -show-translation y -no-ansi -show-translation-phonetics n -show-prompt-message n -show-languages y -show-original-dictionary n -show-dictionary n -show-alternatives n "$2"
示例:
$ google-translate zh-CN hello
hello
你好
[ English -> 简体中文 ]
GoldenDict添加命令:
打开GoldenDict,【编辑】-【词典】-【词典来源】-【程序】,点击【添加】,勾上【已启用】,填写【类型】和【名称】,【类型】选择纯文本,在【命令行】中输入
/opt/applications/bin/google-translate zh-CN "%GDWORD%"
注意:上面脚本地址要改成你的脚本路径
The End
I really like your blog.. very nice colors & theme.
Did you make this website yourself or did you hire
someone to do it for you? Plz reply as I’m looking to create my own blog and would like to know where u got this from.
appreciate it
I create my blog by myself. Pls google ‘wordpress’.
Hi! This is kind of off topic but I need some help from an established blog. Is it very difficult to set up your own blog? I’m not very techincal but I can figure things out pretty fast. I’m thinking about setting up my own but I’m not sure where to begin. Do you have any points or suggestions? Appreciate it
https://metamorfeo.com/
Generally I don’t learn article on blogs, however I would
like to say that this write-up very pressured me to
try and do it! Your writing taste has been amazed me.
Thank you, quite nice post.
I am sure this article has touched all the internet users,
its really really good paragraph on building up new web site.
Hi, I do believe your website might be having browser compatibility
issues. Whenever I look at your website in Safari, it looks fine however,
when opening in IE, it has some overlapping issues.
I merely wanted to give you a quick heads up! Besides that, wonderful site!