以下是能够翻译语言的代码,我分为3种,各有各的好=)
看你们喜欢哪种就用哪种哦~
第一种:
<script src="http://www.gmodules.com/ig/ifr?url=http://www.google.com/ig/modules/translatemypage.xml&up_source_language=zh-CN&w=160&h=60&title=&border=&output=js"></script>
第二种:
<div id="google_translate_element"></div><script>
function googleTranslateElementInit() {
new google.translate.TranslateElement({
pageLanguage: 'zh-CN',
includedLanguages: 'sq,ar,az,ga,et,be,bg,is,pl,fa,af,da,de,ru,fr,tl,fi,ka,ht,ko,nl,gl,ca,cs,hr,lv,lt,ro,mt,ms,mk,no,pt,ja,sv,sr,sk,sl,sw,th,tr,cy,uk,eu,es,iw,el,hu,hy,it,yi,hi,ur,id,en,vi,zh-TW,zh-CN'
}, 'google_translate_element');
}
</script><script src="http://translate.google.com/translate_a/element.js?cb=googleTranslateElementInit"></script>
第三种:
<style>
.google_translate img {
filter:alpha(opacity=100);
-moz-opacity: 1.0;
opacity: 1.0;
border:0;
}
.google_translate:hover img {
filter:alpha(opacity=30);
-moz-opacity: 0.30;
opacity: 0.30;
border:0;
}
.google_translatextra:hover img {
filter:alpha(opacity=0.30);
-moz-opacity: 0.30;
opacity: 0.30;
border:0;
}
</style>
<div>
<a class="google_translate" href="#" target="_blank" rel="nofollow" title="English" onclick="window.open('http://translate.google.com/translate?u='+encodeURIComponent(location.href)+'&langpair=id%7Cen&hl=en'); return false;"><img alt="English" border="0" align="absbottom" title="English" height="32" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjeh7zlKwLpvqgr2BF-yZLqDh4HchOsbVw8zv5kPd7GmMYoWdp8aQygawYehMmTLREg-A6UES5J8jgdBr-cSjISokkK_v5-DTTvNATtijk-VdbICWEnli8Rlb7mKyHm59EDhk7foEn14-4/?imgmax=800" style="cursor: pointer;margin-right:13px" width="24" /></a>
<a class="google_translate" href="#" target="_blank" rel="nofollow" title="French" onclick="window.open('http://translate.google.com/translate?u='+encodeURIComponent(location.href)+'&langpair=id%7Cfr&hl=en'); return false;"><img alt="French" border="0" align="absbottom" title="French" height="32" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhguLGd1umAuDDZ9q0rJSr1NYzsUKzgB9Ec1hszYdQ29EAS3gZJznxfZr84J03LNlZq9QPjnfI1tF5hjL2z6yN44vYRMGAkLv8ne6akwBZ9P6Fhr1xWlPok7anNbgnl-KOXQYeO_Btf1w0/?imgmax=800" style="cursor: pointer;margin-right:13px" width="24" /></a>
<a class="google_translate" href="#" target="_blank" rel="nofollow" title="German" onclick="window.open('http://translate.google.com/translate?u='+encodeURIComponent(location.href)+'&langpair=id%7Cde&hl=en'); return false;"><img alt="German" border="0" align="absbottom" title="German" height="32" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj7GRb7krMx9PuAdXiwOrEmnk7V0GnLRyqH_cDTxYjVdlqLxLXFrgVFZzlJrqeqphC1fyw-k3FycYZieLQWXQk7c4SMzF-VkC6zybsaO6rgwlphCliwXMoLh9alEuA1jduGneEMr0yu3ofU/?imgmax=800" style="cursor: pointer;margin-right:13px" width="24" /></a>
<a class="google_translate" href="#" target="_blank" rel="nofollow" title="Spain" onclick="window.open('http://translate.google.com/translate?u='+encodeURIComponent(location.href)+'&langpair=id%7Ces&hl=en'); return false;"><img alt="Spain" border="0" align="absbottom" title="Spain" height="32" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgxxdSyt_O-MowBfqjGj_etWXsHNPmEd06yiDIK0V-9XMVIsxb0jz130sDaCQpRd66eP6LUWK08AW0dTjPFQfL2FCtuohK2mkm5lnpUAJcoG6XGZp7x9WE6-hsQuFeDHHKmBzzTQR-gosC6/?imgmax=800" style="cursor: pointer;margin-right:13px" width="24" /></a>
<a class="google_translate" href="#" target="_blank" rel="nofollow" title="Italian" onclick="window.open('http://translate.google.com/translate?u='+encodeURIComponent(location.href)+'&langpair=id%7Cit&hl=en'); return false;"><img alt="Italian" border="0" align="absbottom" title="Italian" height="32" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiVpBgNK_zNGdG3Z_M_Np6u8cUPXmYFKNb_V1HjmArzBM61anWajDGCmdjy9YM8EN6UxpHKC-nWDuTtxeBeK5MdGrWDKQ6_uGhDLp4OIB-8PHzK55oQ65bethXWCJwOZNfqtyke1tXEWl0/?imgmax=800" style="cursor: pointer;margin-right:13px" width="24" /></a>
<a class="google_translate" href="#" target="_blank" rel="nofollow" title="Dutch" onclick="window.open('http://translate.google.com/translate?u='+encodeURIComponent(location.href)+'&langpair=id%7Cnl&hl=en'); return false;"><img alt="Dutch" border="0" align="absbottom" title="Dutch" height="32" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgWWawJJBNdQA9hWoAfTAwW3N6BboLj5biLOcffmxWdfmUeJeT3r1YdbX5PV4DIHgeJs-VTSYm_obWruBjawYLKgQEiuvY_GW2mpe_AdVP4dMoOnXhlRmFHPCMiaeFyvXceJzrd_aLL3e4/?imgmax=800" style="cursor: pointer;margin-right:13px" width="24" /></a>
<br /><br />
<a class="google_translate" href="#" target="_blank" rel="nofollow" title="Russian" onclick="window.open('http://translate.google.com/translate?u='+encodeURIComponent(location.href)+'&langpair=id%7Cru&hl=en'); return false;"><img alt="Russian" border="0" align="absbottom" title="Russian" height="32" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhTTj-U8ylexdLeyDYTc6Va3uzxFg2d-mFymHIB22ILlbuFVp25YvA7L_QsK3fREpE5T7Qhbit1B4Xj5ZcWeSCS20gAQUkqU64TlqnTj9G_WNql9uxtHMafWClI0tL0VwiwUev6aLL7yPE/?imgmax=800" style="cursor: pointer;margin-right:13px" width="24" /></a>
<a class="google_translate" href="#" target="_blank" rel="nofollow" title="Portuguese" onclick="window.open('http://translate.google.com/translate?u='+encodeURIComponent(location.href)+'&langpair=id%7Cpt&hl=en'); return false;"><img alt="Portuguese" border="0" align="absbottom" title="Portuguese" height="32" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhOhsafx3Jzgeywv6JzzU8mrD_Q5PvxXYDgfHIuUqXmDqzkASPggoEDrjMahSMi3RC8U54UIQ8rUGKeVKVpLMfIrA2741UIuAup7e96eR1_wdFXNIJPtowDpAAKH2i6S5CzDvsrk1af4ig/?imgmax=800" style="cursor: pointer;margin-right:13px" width="24" /></a>
<a class="google_translate" href="#" target="_blank" rel="nofollow" title="Japanese" onclick="window.open('http://translate.google.com/translate?u='+encodeURIComponent(location.href)+'&langpair=id%7Cja&hl=en'); return false;"><img alt="Japanese" border="0" align="absbottom" title="Japanese" height="32" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjq0EHXxYawUFCOzadAbH0ZXtTLCKRGQJ7b-JHAUkkzW9Imi79Q1GvmBQfC4lrs7NzvRvbKaQE2IrAfDF3DwsaqSq2zm7ybXU8hZ-GfNEc15Tfr8yunpKgmpoboa1_J5xWvc_o9eoeCXhv9/?imgmax=800" style="cursor: pointer;margin-right:13px" width="24" /></a>
<a class="google_translate" href="#" target="_blank" rel="nofollow" title="Korean" onclick="window.open('http://translate.google.com/translate?u='+encodeURIComponent(location.href)+'&langpair=id%7Cko&hl=en'); return false;"><img alt="Korean" border="0" align="absbottom" title="Korean" height="32" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiCnQlr1EPLm0veTPol4279j3GzttPX2xg6jmLDwkZFAR1PyQtIKA7GzQWdV47wdBVosnrke2f6-nVQx9gaybWAz1z7vp_oaImqgmsKYQmWQ3QvwKoRKcI_hfkiRrJ1Ffme-Atullis494/?imgmax=800" style="cursor: pointer;margin-right:13px" width="24" /></a>
<a class="google_translate" href="#" target="_blank" rel="nofollow" title="Arabic" onclick="window.open('http://translate.google.com/translate?u='+encodeURIComponent(location.href)+'&langpair=id%7Car&hl=en'); return false;"><img alt="Arabic" border="0" align="absbottom" title="Arabic" height="32" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEit0fplOBBLxoxqBC7Wz1nJOyrg3-SwYuleYcvzWVSdXp2Sd-GxDvFkZmePzCvxtfNQBdX-1Pp5FGl4md7fALX5PaiMVemVSWBcWtH1i_uoZaFNxwT_MxGcI_sLJNdCPvc5Tg8hXENSoJs/?imgmax=800" style="cursor: pointer;margin-right:13px" width="24" /></a>
<a class="google_translate" href="#" target="_blank" rel="nofollow" title="Chinese Simplified" onclick="window.open('http://translate.google.com/translate?u='+encodeURIComponent(location.href)+'&langpair=id%7Czh-CN&hl=en'); return false;"><img alt="Chinese Simplified" border="0" align="absbottom" title="Chinese Simplified" height="32" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEglHQi_Bnq0sWahjJGdod72f-QwlbTh5BgqZrBX_t_DkdK0FqBk3BSbZ0ERnD9zTMQ1U5qPbMVuiH4JfYquwLMwf7L-jkVMhFvzOfc3hQ7BQdoUyQwLdQfDvgfn1FelvjIDl_wuOA7joYg/?imgmax=800" style="cursor: pointer;margin-right:13px" width="24" /></a>
</div><div style="font-size:10px;margin:10px 0px 3px 0px">
by : <a href="http://www.blogspottutorial.com">BTF</a>
</div>
在这三种之中选出你要的一种,然后Copy他的代码
到Design-->Add Gadget
选java script/HTML,将你选的代码放进去按Save就可以了=)
完成~
by:kenchy
0 comments:
Post a Comment