将“Google 翻译”添加到您的网站
2012-04-28 09:49
141 查看
将 Google 网站翻译器添加到您的网页,可让访问者即时查看自动翻译的网页。网站翻译器的添加十分快捷简单,具体操作步骤如下:
将此段代码复制并粘贴到您的网页上
添加整个网页的翻译
<div id="google_translate_element"></div><script>
function googleTranslateElementInit() {
new google.translate.TranslateElement({
pageLanguage: 'zh-CN',
multilanguagePage: true
}, 'google_translate_element');
}
添加网页的某个部分的翻译
<script>
function googleSectionalElementInit() {
new google.translate.SectionalElement({
sectionalNodeClassName: 'goog-trans-section',
controlNodeClassName: 'goog-trans-control',
background: '#f4fa58'
}, 'google_sectional_element');
}
</script>
<script src="//translate.google.com/translate_a/element.js?cb=googleSectionalElementInit&ug=section&hl=zh-CN"></script>
</script><script src="//translate.google.com/translate_a/element.js?cb=googleTranslateElementInit"></script>
将此段代码复制并粘贴到您的网页上
添加整个网页的翻译
<div id="google_translate_element"></div><script>
function googleTranslateElementInit() {
new google.translate.TranslateElement({
pageLanguage: 'zh-CN',
multilanguagePage: true
}, 'google_translate_element');
}
添加网页的某个部分的翻译
<script>
function googleSectionalElementInit() {
new google.translate.SectionalElement({
sectionalNodeClassName: 'goog-trans-section',
controlNodeClassName: 'goog-trans-control',
background: '#f4fa58'
}, 'google_sectional_element');
}
</script>
<script src="//translate.google.com/translate_a/element.js?cb=googleSectionalElementInit&ug=section&hl=zh-CN"></script>
</script><script src="//translate.google.com/translate_a/element.js?cb=googleTranslateElementInit"></script>
相关文章推荐
- 使用google的translation api 为网站添加翻译功能
- 使用google 语言 api 来实现整个网站的翻译
- Google 翻译让你的网站拥有不同语言版本
- 如何在Joomla中添加Google的网站分析代码
- google,翻译英文网站
- c#调用google api 实现google网站上翻译全功能(原创)
- 百家搜索:在网站中添加Google、百度等搜索引擎
- 百家搜索:在网站中添加Google、百度等搜索引擎
- 百家搜索:在网站中添加Google、百度等搜索引擎
- Google网站翻译工具:帮您扩大全球受众群
- 巧用GOOGLE突破网站限制免费在线翻译
- 使用“Google 翻译”工具实现多语言版网站
- js网站上添加tweet facebook google+等英文分享按钮代码
- 借助Google Translate API实现网站多国语言翻译功能
- 给大家推荐一个在线翻译的网站,就个人使用感觉来说比google的翻译要好!
- 开发者学习网站--Google技术网站
- GoogleServices之GooglePlayService官方文档翻译
- 给你的网站添加标识图标(也就是地址栏的图标)
- 从零开始搭建自己的网站八:文本编辑器Ueditor添加
- Google有多强大 请看全网页翻译