开发外贸电子商务站点时,往往会涉及到多语言这一项,虽magento提供了多语言功能,但操作上会比较复杂,商品内容还需人工手动处理,但对于中小外贸公司的开发成本相对高很多,这里我们用最简单的方式来处理magento站点多语言的功能
<div>
<style>
.goog-te-combo{width: px !important;}
.goog-te-balloon-frame{display: none !important;}
font{background: transparent !important;}
a font:hover{ color: !important;}
#google_translate_element{height: 26px !important;overflow: hidden !important;}
.goog-te-banner-frame{display: none !important;}
body{top: 0px !important;}
</style>
<!– Google Element Translator –>
<div id="google_language_drop">
<div id="google_translate_element"></div>
<script>
function googleTranslateElementInit() {
new google.translate.TranslateElement({
includedLanguages: ‘en,de,af,sq,ar,hy,az,eu,be,bg,ca,zh-CN,zh-TW,hr,cs,da,nl,et,tl,fi,fr,gl,ka,el,ht,iw,hi,hu,is,id,ga,it,ja,ko,la,lv,lt,mk,ms,mt,no,fa,pl,pt,ro,ru,sr,sk,sl,es,sw,sv,th,tr,uk,ur,vi,cy,yi’,
// pageLanguage: ‘<?php echo $this->__(‘en’) ?>’,
gaTrack: true,
// gaId: ‘UA-12345678-1′
}, ‘google_translate_element’);
}
</script>
<script src="https://translate.google.com/translate_a/element.js?cb=googleTranslateElementInit"></script>
</div>
</div>
(责任编辑:好模板) |