使用BING Translator AJAX API翻译整个网页 [英] Translating a whole web page using BING Translator AJAX API

查看:211
本文介绍了使用BING Translator AJAX API翻译整个网页的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想翻译整个网页而不使用网页小部件但使用ajax api。

I wanted to translate a whole web page without using the web widget but using ajax api .

推荐答案

看一下这个页面:
http: //msdn.microsoft.com/en-us/library/ff512406.aspx

您可以将"yor"的内容类型设置为"要翻译的文本"。到HTML。这是描述... 

You can set the content type of yor "to be translated text" to HTML. Here's the description... 

contentType

正在翻译的文本的格式。支持的格式是"text / plain"。和"text / html"。任何HTML都需要格式良好。

The format of the text being translated. The supported formats are "text/plain" and "text/html". Any HTML needs to be well-formed.

有很多实用程序/ API可以轻松检查HTML是否符合w3c规范。

There are a lot of utilities/API's that can easily check whether the HTML conforms to the w3c specification.

另请注意,现在每天在进行一些AJAX调用后加载页面因此,请确保您传递的HTML页面不依赖于此类调用,否则您将无法获得预期结果。

Also note that now-a-days the pages load after making some AJAX calls so make sure that the HTML page that you are passing does not depend on such calls otherwise you wont be getting the expected results.

- CandorZ 

- CandorZ 


这篇关于使用BING Translator AJAX API翻译整个网页的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆