使用Bing翻译窗口小部件或Google Website Translator Gadget翻译网站内容

添加时间:18-05-14 所属分类:HTML网页,JS语言与代码
 
当然google也有类似的应用,但是考虑到google在中国的连接情况还是选择了bing(听说google返回中国市场后会好些)
bing使用方法
复制以下代码并将其放入您的 HTML 中即可。(我建立了个高级文本小工具放边上了)

[code]
<div id='MicrosoftTranslatorWidget' class='Dark' style='color:white;background-color:#555555'></div><script type='text/javascript'>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/v3/WidgetV3.ashx?siteData=ueOIGRSKkd965FeEGM5JtQ**&ctf=True&ui=true&settings=Manual&from=';var p=document.getElementsByTagName('head')[0]||document.documentElement;p.insertBefore(s,p.firstChild); }},0);</script>[/code]

也可自己定制:https://www.bing.com/webmaster/tools/translator/

google使用方法

复制下面的代码粘贴到网页中就可以了:

[code]<div id="google_translate_element"></div>
<script>
function googleTranslateElementInit() {
new google.translate.TranslateElement({
pageLanguage: 'zh-CN'
}, 'google_translate_element');
}
</script>
<script src="http://translate.google.com/translate_a/element.js?cb=googleTranslateElementInit"></script>
[/code]

或者你也可以在wp后台安装“Google Website Translator by Prisna.net”插件。

使用后果使用英文(外文)的系统访问,会显示语言翻译条

简单wordpress多语言-使用Bing翻译窗口小部件或Google Website Translator Gadget翻译网站内容
但是中文系统不会受任何影响。

官方参考: http://googleblog.blogspot.com/2009/09/ ... oogle.html
另外我觉得bing的翻译质量比较高,推荐使用。

前篇:湖北黄冈83岁退休教师跟跑半马,当晚还教了... 后篇:济南市出台节能奖励办法 单位节能贡献突出可...
发表我的评论


推荐文章   执着守望梦想 首演灌酒壮胆 济南街头艺...   国外450斤胖女友怒减320斤,只为能配上...   潺潺复泠泠 处处是泉声   这些学校的微博火了:每天公示学生伙食...   “我今年27,现在慌得一比”
随机文章   使用CSS制作文字环绕图片效果(文字内容...   JAVA支付宝:web页面扫码支付、网站支付...   JAVA微信:微信扫码支付、调用统一下单...   CSS中的ul与li样式详解:   css ul li图片-不换行-横排样式
广告

其他推荐

因为本站所有内容均转载自其它媒体,本意为公众提供免费服务,但并不代表本网赞同其观点,也不能对其真实性验证负责,如稿件版权单位或个人不想在本网发布,请与我联系,本人会立即将其撤除,谢谢.联系方式:atseashawk@163.com QQ:99289555