本帖最后由 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>
|