Google Translate 參數具體含義

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

记录并分享
Built with Hugo
Theme Stack designed by Jimmy