0

我已将谷歌网站翻译器与我的网站集成,但我只需要在下拉列表中使用英语和法语。如何更改下拉列表?

4

2 回答 2

2

我们必须添加 includeLanguages: 'en,fr' 如下所述...

<script type="text/javascript">
function googleTranslateElementInit() {
  new google.translate.TranslateElement({pageLanguage: 'en',includedLanguages: 'en,fr', layout: google.translate.TranslateElement.InlineLayout.SIMPLE}, 'google_translate_element');
}
</script>
于 2013-02-01T11:49:50.663 回答
0
<div id="google_translate_element"></div><script type="text/javascript">
function googleTranslateElementInit() {
  new google.translate.TranslateElement({pageLanguage: 'ar', 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>
于 2013-02-01T11:29:45.937 回答