翻译我的Web应用程序时出错 [英] Error on translating my web application

查看:95
本文介绍了翻译我的Web应用程序时出错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用的代码和我得到的错误(附有屏幕截图)

The code I used and the error I am getting (screenshot attached)

<div onclick="event.stopPropagation();" id="translaterWidget"></div>    

var ts = document.getElementById("translaterWidget");
ts.innerHTML = '<div id="MicrosoftTranslatorWidget"></div>';

ts.style.display = 'block';

setTimeout(function() {
  var s = document.createElement("script");
  s.type = "text/javascript";
  s.charset = "UTF-8";
  s.src = ((location && location.href && location.href.indexOf('https') == 0) ? "https://ssl.microsofttranslator.com" : "http://www.microsofttranslator.com") + "/ajax/v2/widget.aspx?mode=auto&from=en&layout=ts";
  var p = document.getElementsByTagName('head')[0] || document.documentElement;
  p.insertBefore(s, p.firstChild);
}, 0);

错误

_mste3("TranslateApiException:IP超出配额:ID = 0642.V2_Json.TranslateArray.16B1A559");

_mste3("TranslateApiException: IP is over the quota: ID=0642.V2_Json.TranslateArray.16B1A559");

推荐答案

不建议使用Microsoft Translator Web窗口小部件.考虑仅使用翻译器文本API或网页翻译器.使用网页翻译器是免费的,Azure门户中有翻译器文本API订阅,您可以每月订阅不超过200万个字符的免费使用.

The Microsoft Translator Web Widget is being deprecated. Consider using only the Translator Text API or the Webpage Translator. There is no charge to use Webpage Translator and there's a Translator Text API subscription in the Azure portal that you can subscribe to for monthly use up to 2 million characters at no charge.

这篇关于翻译我的Web应用程序时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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