使用Bing Translator Widget和Personal AppId [英] Using Bing Translator Widget with Personal AppId

查看:87
本文介绍了使用Bing Translator Widget和Personal AppId的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

亲爱的小组,

我正在尝试扩展现有的邮件加载项"电子邮件转换器"有许多新功能。我计划使用Translator API而不是使用小部件来扩展应用程序的功能。

I am trying to extend my existing mail add-in "Email Translator" with many new features. I planned to use the Translator API rather than using the widget to extend the functionality of the app.

虽然我可以通过API进行翻译,但我无法引入Bing Translator Widget中已存在的功能。例如,Translator小部件读取HTML并仅通过TranslateArray发送要翻译的文本  API。无论
html页面有多大,文本都以块的形式发送到翻译服务并在DOM中替换。我试图实现相同的功能,但我无法实现。

Although I can translate via API, I can not bring in the features which already exists in Bing Translator Widget. For example, Translator widget reads the HTML and only send the texts for translation through TranslateArray  api. No matter how big the html page is, the text are sent in chunks to the translation service and replaced in DOM. I am trying to achieve the same functionality however I am unable to do so.

实现与Bing转换器小部件完全相同的功能似乎需要花费大量工作和时间,只有一个区别我的小部件将使用我的ClientID和Secret并调用翻译API。

It appears to be lot of work and time to achieve the exact same functionality as Bing translator widget with only one difference that my widget will use my ClientID and Secret and make a call to translator API.

我已经尝试了几件事,但未能达到目标,所以我想知道如果我可以使用现有的Bing Translator Widget和我的ClientId和Secret密钥。我想我可以用我的自定义应用
id来编写我的自定义javascript以覆盖小部件的AppId。

I have tried several things but fail to achieve the same so I would like to know If I can use existing Bing Translator Widget with my ClientId and Secret key. I think I can write my custom javascript to override the AppId of the widget with my custom app id.

如果您能告诉我,我将不胜感激如果我可以覆盖Bing转换器小部件,或者是否有任何开源JavaScript库来解析html并将其分解为块。我严格不希望将完整的电子邮件数据发送到我的应用程序
服务器,使用"HTML Agility Pack"进行解析,翻译并发送回客户端。

I would appreciate if you could let me know If I can override the Bing translator widget or if there is any open source javascript library to parse html and break it in to chunks. I strictly do not wish to take the complete email data on to my application server, parse using "HTML Agility Pack", translate and send back to client.

谢谢,

Pallav

Thank you,
Pallav

推荐答案

嗨Pallav,

Hi Pallav,

当您启用协作翻译时,Widget会使用您的帐户。

The Widget uses your account when you enable collaborative translations.

您可以通过https:// msdn查看小部件API。 microsoft.com/en-us/library/dn341983.aspx,以查找更多自定义选项。

You can look at the widget API at https://msdn.microsoft.com/en-us/library/dn341983.aspx, to find more customization options.

Translator API可以翻译HTML元素,最大可达10K个字符。您可以按顺序提供系统HTML元素。

The Translator API can translate HTML elements, up to 10K characters in size. You could feed the system HTML elements in sequence.

使用HTML敏捷包来解析文档没有根本问题,你也可以这样做。

There is no fundamental problem with using the HTML agility pack to parse the document, you can do that too.

如果你描述你的意图,我可以提供更多有针对性的提示。

If you describe your intent, I could give more targeted hints.

Chris Wendt

Microsoft Translator

Chris Wendt
Microsoft Translator


这篇关于使用Bing Translator Widget和Personal AppId的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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