• 使用bing或google来翻译网页


    google代码:在</head>之后插入

    <meta name="google-translate-customization" content="4bd8dffe75af5007-16fa37f088724895-g08c0457d35008bb8-47"></meta>
     

    并在要显示按钮的地方插入如下代码:

    <div id="google_translate_element"></div><script type="text/javascript">function googleTranslateElementInit() { new google.translate.TranslateElement({pageLanguage: 'en', includedLanguages: 'zh-CN', layout: google.translate.TranslateElement.InlineLayout.SIMPLE}, 'google_translate_element');}</script><script type="text/javascript" src="//translate.google.com/translate_a/element.js?cb=googleTranslateElementInit"></script>

     

    bing代码:

    <div id='MicrosoftTranslatorWidget' class='Light' 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=False&ui=true&settings=Auto&from=en';var p=document.getElementsByTagName('head')[0]||document.documentElement;p.insertBefore(s,p.firstChild); }},0);</script>
     


  • 相关阅读:
    ExIco应用程序图标保存器1.0发布
    Object.defineProperty
    es6代理 proxy 学习
    node js学习记录
    css默认值列表
    关于 keyup keydown keypress
    转载一篇关于css选择器的,很透彻
    ......图片上传
    mimi
    css 开发心得
  • 原文地址:https://www.cnblogs.com/absudra/p/9557612.html
Copyright © 2020-2023  润新知