https://github.com/jaredtao/transer
自动翻译器
https://github.com/jaredtao/transer
baidu-translate baidu-translate-api golang translation translation-api youdao-fanyi youdao-translation-apu
Last synced: 12 months ago
JSON representation
自动翻译器
- Host: GitHub
- URL: https://github.com/jaredtao/transer
- Owner: jaredtao
- License: mit
- Created: 2019-05-02T18:36:12.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2020-09-02T09:05:34.000Z (almost 6 years ago)
- Last Synced: 2025-04-09T08:51:19.809Z (about 1 year ago)
- Topics: baidu-translate, baidu-translate-api, golang, translation, translation-api, youdao-fanyi, youdao-translation-apu
- Language: Go
- Homepage:
- Size: 3.65 MB
- Stars: 10
- Watchers: 1
- Forks: 8
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Transer
## 简介
golang 翻译器
目前实现了百度和有道的翻译API对接
提供了两个命令行工具:
## Transer
单条翻译,有道 只支持13国语言。

## QtTranser
Qt的多语言文件批量翻译

## Go环境
golang 1.12及以上
## 编译/运行
在源码目录执行go run并提供参数即可,不提供参数则显示Uasge。 例如:
```
PS E:\Dev\go\Transer> go run .\cmd\QtTranser
-api string
baidu | youdao (default "baidu")
-inputFile string
the input file need translate
-outputFile string
the output file (default "out.tr")
-secret string
your secret (default "0d2RvCho9XZNEO5GCGNs")
-targetLang string
zh | en | ja | ko | fr | es | pt | it | ru | vi | de | ar | id (default "zh")
-userID string
your id (default "20190502000293463")
```
默认userID和secret是我个人申请的有道账号,可能过期,请自行替换为百度/有道账号。
## Build status
[](https://travis-ci.org/jaredtao/Transer)
## License
[](https://github.com/jaredtao/Transer/blob/master/LICENSE)
参考资料:https://zhuanlan.zhihu.com/p/37690859