陋室铭
永远也不要停下学习的脚步(大道至简至易)

  • google

http://translate.google.cn/translate_a/single?client=gtx&dt=t&dj=1&ie=UTF-8&sl=auto&tl=zh_TW&q=calculate

复制代码
{
    "sentences": [
        {
            "trans": "計算",
            "orig": "calculate",
            "backend": 1
        }
    ],
    "src": "en",
    "confidence": 0.9609375,
    "ld_result": {
        "srclangs": [
            "en"
        ],
        "srclangs_confidences": [
            0.9609375
        ],
        "extended_srclangs": [
            "en"
        ]
    }
}
复制代码
  • Bing

http://api.microsofttranslator.com/v2/Http.svc/Translate?appId=AFC76A66CF4F434ED080D245C30CF1E71C22959C&from=&to=en&text=考勤计算

<string xmlns="http://schemas.microsoft.com/2003/10/Serialization/">Attendance calculation</string>

不添加from参数或者from为空都自动检测语言

  • Baidu

http://fanyi.baidu.com/transapi?from=auto&to=cht&query=Calculation

复制代码
{
    "from": "en",
    "to": "cht",
    "domain": "all",
    "type": 2,
    "status": 0,
    "data": [
        {
            "dst": "計算",
            "prefixWrap": 0,
            "src": "Calculation",
            "relation": [],
            "result": [
                [
                    0,
                    "計算",
                    [
                        "0|6"
                    ],
                    [],
                    [
                        "0|6"
                    ],
                    [
                        "0|6"
                    ]
                ]
            ]
        }
    ]
}
复制代码

v2transapi已经失效

  • Youdao

http://fanyi.youdao.com/translate?&doctype=json&type=AUTO&i=计算

复制代码
{
    "type": "ZH_CN2EN",
    "errorCode": 0,
    "elapsedTime": 1,
    "translateResult": [
        [
            {
                "src": "计算",
                "tgt": "To calculate"
            }
        ]
    ]
}
复制代码

type的类型有:

ZH_CN2EN 中文 » 英语
ZH_CN2JA 中文 » 日语
ZH_CN2KR 中文 » 韩语
ZH_CN2FR 中文 » 法语
ZH_CN2RU 中文 » 俄语
ZH_CN2SP 中文 » 西语
EN2ZH_CN 英语 » 中文
JA2ZH_CN 日语 » 中文
KR2ZH_CN 韩语 » 中文
FR2ZH_CN 法语 » 中文
RU2ZH_CN 俄语 » 中文
SP2ZH_CN 西语 » 中文

posted on 2019-03-01 11:49  宏宇  阅读(1781)  评论(0编辑  收藏  举报