Discuz!官方免费开源建站系统

 找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索

[求助] 想把google的Website Translator功能加入到论坛上,该在哪插代码?thanks

[复制链接]
blackantt 发表于 2013-7-18 11:10:25 | 显示全部楼层 |阅读模式
本帖最后由 blackantt 于 2013-7-18 11:12 编辑

想把google的Website Translator功能加入到论坛上,该在哪插代码?
  它的说明是用html页面做例子的,但discuz就只有php文件,在哪插入这2段代码呢?

Paste this code onto your websiteCopy and paste the following code snippets onto every page you want to translate
Place this meta tag before the closing </head>
<meta name="google-translate-customization" content="f1420534e0ab1762-49ac98a6e62e463f-gc0643139efe64a4e-10"></meta>

Place this snippet where you'd like to display the Website Translator plugin on your page

<div id="google_translate_element"></div><script type="text/javascript">
function googleTranslateElementInit() {
  new google.translate.TranslateElement({pageLanguage: 'zh-CN', includedLanguages: 'en,ja,ko,th,vi,zh-TW', layout: google.translate.TranslateElement.FloatPosition.TOP_LEFT, multilanguagePage: true}, 'google_translate_element');
}
</script><script type="text/javascript" src="//translate.google.com/translate_a/element.js?cb=googleTranslateElementInit"></script>

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

手机版|小黑屋|Discuz! 官方站 ( 皖ICP备16010102号 )star

GMT+8, 2024-9-22 19:37 , Processed in 0.188399 second(s), 17 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2023, Tencent Cloud.

快速回复 返回顶部 返回列表