在线自动翻译不再是神话,虽然机器的翻译质量仍不能和专业翻译人员相提并论,但已经发展到可以让人大体理解的地步,目前,最著名的4个翻译引擎包括Google Translate, Babel Fish, Promt or FreeTranslations,其中 GoogleTranslate 发展最为迅猛,本文介绍4个在线翻译 Web API,它们绝大多数都基于 Google Translate。
Google Translate Tools 的一个替代品是 The TranslateThis Button。这也是一个翻译 widget,可以被复制粘贴到你的网页,该 widget 基于 Google 翻译 API,因此,也提供52种语言的翻译,但用户界面更漂亮一些,使用了灯箱式对话框,现实不同语种的图标,更重要的是它不会将用户重定向到 Google 站点。
该 widget 使用 JavaScript,将 Google 的翻译结果替换到当前页面,它的速度也很不错。整个 API 的尺寸不少过12 k,相当小巧。
functionexternalLinks() { if (!document.getElementsByTagName) return; var anchors = document.getElementsByTagName("a"); for (var i=0; i<anchors.length; i++) { var anchor = anchors[i]; if (anchor.getAttribute("href") &&