Google Translate API 并没有正式的文档, 下面是从网上总结的一些参数的具体含义。
地址:
https://translate.google.cn/translate_a/single
参数含义:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
client - 客户端类型 webapp(基于网页访问服务器)
sl - 翻译源语言代码 (auto 表示自动识别)
tl - 翻译目标语言
hl - 界面语言
q - 要翻译的文本
otf - "2" 未知
ssel - "0" 未知
tsel - "0" 未知
kc - "1" 未知
tk - 谷歌服务器会核对的token
ie - input encoding (a guess)
oe - output encoding (a guess)
dt - 翻译需要包含的属性,具体内容如下
t - translation of source text
at - alternate translations
rm - transcription / transliteration of source and translated texts
bd - dictionary, in case source text is one word (you get translations with articles, reverse translations, etc.)
md - definitions of source text, if it's one word
ss - synonyms of source text, if it's one word
ex - examples
rw - See also list.
dj - Json response with names. (dj=1)
|
参考代码:
https://github.com/VictorZhang2014/free-google-translate
https://stackoverflow.com/questions/26714426/what-is-the-meaning-of-google-translate-query-params/29537590#29537590