1 / 13

在线自动翻译 API

在线自动翻译 API. Google 翻译 API TranslateThisButton 翻译 API jQuery 翻译插件 Yahoo Babel Fish 翻译 API Microsoft Live Search 翻译工具. Google 翻译 API. http://code.google.com/intl/zh-CN/apis/language/translate/overview.html. 使用 Google 翻译 API 的两种方式. 在使用 JavaScript 语言的网页中调用 API google.load() 装载 API 模块

Download Presentation

在线自动翻译 API

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. 在线自动翻译API • Google翻译API • TranslateThisButton翻译API • jQuery翻译插件 • Yahoo Babel Fish翻译API • Microsoft Live Search翻译工具

  2. Google翻译API http://code.google.com/intl/zh-CN/apis/language/translate/overview.html

  3. 使用Google翻译API 的两种方式 • 在使用JavaScript语言的网页中调用API • google.load() 装载API模块 • google.language.translate() 执行翻译 • 返回结果 JavaScript对象 • 使用get方法 • 标准URL地址https://ajax.googleapis.com/ajax/services/language/translate

  4. 参数 • v API版本号 v=1.0 • q 指定需要翻译的文本 • langpair 指定了待翻译文本的语言类型和译文的语言类型 e.g. 将英语文本“Hello, my friend!”翻译成西班牙语 http://ajax.googleapis.com/ajax/services/language/translate?v=1.0&q=Hello,%20my%20friend!&langpair=en%7Ces

  5. 返回结果 采用JSON(JavaScript Object Notation)数据交换格式返回翻译结果 http://ajax.googleapis.com/ajax/services/language/translate?v=1.0&q=Hello,%20my%20friend!&langpair=en%7Ces { “responseData”:{ “translatedText”: “Hola, mi amigo!” }, “responseDetails”: null, “responseStatus”: 200 }

  6. Yahoo Babel Fish翻译API

  7. 使用方式 在开发网页上调用整个Babel Fish翻译控件 <script type="text/javascript" charset="UTF-8" language="JavaScript1.2" src="http://babelfish.yahoo.com/free_trans_service/babelfish1.js"> </script> <noscript> <a href="http://babelfish.yahoo.com">Yahoo! Babel Fish</a> </noscript>

  8. Microsoft Live Search翻译工具 • 页面Widget • AJAX(Asynchronous JavaScript and XML) API http://msdn.microsoft.com/en-us/library/ff512404.aspx

  9. GoldenDict在线全文翻译模块 • 使用Google翻译API • 使用get方法调用API

  10. 在线资源模块

More Related