Google Translate Widget cho phép khách viếng thăm dịch trang web của bạn ra nhiều thứ tiếng với ngôn ngữ riêng của họ. Dĩ nhiên các phần dịch này là của Google. Widget này hỗ trợ 12 thứ tiếng là : English, French, German, Spanish, Italian, Dutch, Brazilian, Russian, Japanese, Korean, Arabic và Chinese.
Các bạn làm theo từng bước sau để chèn widget này vào blog của mình :
Bước 1 : Đăng nhập Blogger--> Chon bố cục--> Thêm tiện ích HTML/ Javascript
Bước 2 : Copy đoạn code sau và paste vào :
[code lang="javascript"]
<script type="text/javascript">
function showHide(shID) {
if (document.getElementById(shID)) {
if (document.getElementById(shID+'-show').style.display != 'none') {
document.getElementById(shID+'-show').style.display = 'none';
document.getElementById(shID).style.display = 'block';
}
else {
document.getElementById(shID+'-show').style.display = 'inline';
document.getElementById(shID).style.display = 'none';
}
}
}
</script>
<style>
.google_translate img {
margin: 10px 20px 0px 20px;
height: 24px;
width: 24px;
}
.google_translate:hover img {
filter:alpha(opacity=0.30);
-moz-opacity: 0.30;
opacity: 0.30;
border:0;
}
.more {
display: none;
a.showLink, a.hideLink {
text-decoration: none;
color: #0880C4;
padding-left: 18px;
background: transparent('down.gif') no-repeat left; }
a.hideLink {
background: transparent url('up.gif') no-repeat left;
color: #0880C4;}
a.showLink:hover, a.hideLink:hover {
color: #0880C4;
}
</style>
<div>
<a href="#" target="_blank" rel="nofollow" title="English" onclick="window.open('http://translate.google.com/translate?u='+encodeURIComponent(location.href)+'&langpair=auto%7cen&hl=en'); return false;"><img alt="English" border="0" align="absbottom" title="English" height="24" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEguXGV52hUb1LEaX9cFeHp-GQ5s1GZ1_Mwcq-z0BK4zZjmk2EtK4Yf7h3Isn3k62kB968-kTks6jDMkw6zead287fw3Dd9u1M3s5jhhYum5QC14lcpOsGhnYwCGri2yJ2CQHGqa5m1HHHEl/s1600/United+Kingdom(Great+Britain).png" style="cursor: pointer;margin-right:8px" width="24"/></a>
<a href="#" target="_blank" rel="nofollow" title="French" onclick="window.open('http://translate.google.com/translate?u='+encodeURIComponent(location.href)+'&langpair=auto%7cfr&hl=en'); return false;"><img alt="French" border="0" align="absbottom" title="French" height="24" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiB_OzZNlEREeQ1D14foju9RbMHI0aLQNr0KINOWIiXbnoDbac-aJSyM1O6JpOxGL4bi_p4xkKfuL6nxrWR2CW7dFAeEUiFDVU_r-Ro-aZRjEC-ouTggHuNJ7nlnvzSXshM9XMPmL1GwPIy/s1600/France.png" style="cursor: pointer;margin-right:8px" width="24"/></a>
<a href="#" target="_blank" rel="nofollow" title="German" onclick="window.open('http://translate.google.com/translate?u='+encodeURIComponent(location.href)+'&langpair=auto%7cde&hl=en'); return false;"><img alt="German" border="0" align="absbottom" title="German" height="24" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiV4TX6b3EDjJSb0GmJUK0NP1urgPbsMCSvfKV2MB8cJimVFwEnTj4EjDwq409Pjv93nES2QBSnb7cRrU6Ab8F79jJUDNqYJjthyphenhyphen-A4EuZtZcLAAzN56QL4aAzMhAF-A9IezJIQRKyCtdvy/s1600/Germany.png" style="cursor: pointer;margin-right:8px" width="24"/></a>
<a href="#" target="_blank" rel="nofollow" title="Spain" onclick="window.open('http://translate.google.com/translate?u='+encodeURIComponent(location.href)+'&langpair=auto%7ces&hl=en'); return false;"><img alt="Spain" border="0" align="absbottom" title="Spain" height="24" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiYUed9QTCs8As0INaXaPn95g54qvCsqtPHU7XKp9Dq223SjUBypdy25jEc2lFSxIaQQRc6_CgE5ti2xOgZZN7b4lxbNhAvoC0kQQ3o8wLRyuETPZVYAPrCbDRxuGT2SaQxtKvtyv7D-G_p/s1600/Spain.png" style="cursor: pointer;margin-right:8px" width="24"/></a><a href="#" id="example-show"
onclick="showHide('example');return false;">More</a>
<div id="example">
<a href="#" target="_blank" rel="nofollow" title="Italian" onclick="window.open('http://translate.google.com/translate?u='+encodeURIComponent(location.href)+'&langpair=auto%7cit&hl=en'); return false;"><img alt="Italian" border="0" align="absbottom" title="Italian" height="24" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhNdwI6qpitzsoDkgzsidgLMMuIQQd9U43pYrsHBSMUwoszrLJXcjEd3F6NgAJ-aa0uESLK11g-wdPt1Dsk3dMvnrb3dr9fFzdES2GW_eVVePMZR76yj5h-X3Q_yAH8NtHxf4I6ABxl102G/s1600/Italy.png" style="cursor: pointer;margin-right:8px" width="24"/></a>
<a href="#" target="_blank" rel="nofollow" title="Dutch" onclick="window.open('http://translate.google.com/translate?u='+encodeURIComponent(location.href)+'&langpair=auto%7cnl&hl=en'); return false;"><img alt="Dutch" border="0" align="absbottom" title="Dutch" height="24" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjoSkCnjA2LVPJ8TYDHcH_jiDtfK1PyiBjbCN0jK9Y-wiILGNYqiReCg6aBRdk5PaZVfkZYrT_k1_Q90rHNMB80_Vleo_T3aIC-8bTGZJiPUhEhla7rYRloJYHASksJwSAwK-J6hslfjNQn/s1600/Netherlands.png" style="cursor: pointer;margin-right:8px" width="24"/></a>
<a href="#" target="_blank" rel="nofollow" title="Russian" onclick="window.open('http://translate.google.com/translate?u='+encodeURIComponent(location.href)+'&langpair=auto%7cru&hl=en'); return false;"><img alt="Russian" border="0" align="absbottom" title="Russian" height="24" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhkb3l4nw-XHALilMJK0Xr7oexUkByyRvIjm1OXLAgDtBZ73tQrEmmtR7gn5c_mHoWO8a9LF2Q-sDMs_DrgC3CmNa-SYa1gt2nf-uI-v74izQywBd21pOCik5ZDLcTpCJqlXGN2gQMmFXeR/s1600/Russian+Federation.png" style="cursor: pointer;margin-right:8px" width="24"/></a>
<a href="#" target="_blank" rel="nofollow" title="Portuguese" onclick="window.open('http://translate.google.com/translate?u='+encodeURIComponent(location.href)+'&langpair=auto%7cpt&hl=en'); return false;"><img alt="Portuguese" border="0" align="absbottom" title="Portuguese" height="24" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiuBtLUL60L16ER-e77xXFKyZXf1eDKshkQL80E7mKocZm1i23NrDGG0tuAd0-ZTknyFZTK6AEoCdXciLHATF5PWoFcea0GFGBprHV0rMF5Dr5htrKX36vOGzZNccHhK2h_ntueripadeHP/s1600/Brazil.png" style="cursor: pointer;margin-right:8px" width="24"/></a>
<br />
<a href="#" target="_blank" rel="nofollow" title="Japanese" onclick="window.open('http://translate.google.com/translate?u='+encodeURIComponent(location.href)+'&langpair=auto%7cja&hl=en'); return false;"><img alt="Japanese" border="0" align="absbottom" title="Japanese" height="24" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEihwyB-dKc10_azqaO2TBUoRZrZ_578CCS1bBOL2K1nJs-_1iipCmjhEFZVZ-d0ArHGC7Gn0rj2uoct72isHPnnJstv_wgK0gJs3ojYPumrHhzCqUQnZMYmhvVYjEr-ScQCotu5nVN3zQ7s/s1600/Japan.png" style="cursor: pointer;margin-right:8px" width="24"/></a>
<a href="#" target="_blank" rel="nofollow" title="Korean" onclick="window.open('http://translate.google.com/translate?u='+encodeURIComponent(location.href)+'&langpair=auto%7cko&hl=en'); return false;"><img alt="Korean" border="0" align="absbottom" title="Korean" height="24" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjJu0WLNG3QHu2z45FaqGGRUcNxt7GHwHyolqCaI3USofdWg8W3EzoFOEadIaMqV7a-w7iAxCdi39nvmL3VN3O7lF427GoAHCkyrqzxLNQZblDG4pCagv9lhTXR6ZZgvMc49tT37DTAVHbr/s1600/South+Korea.png" style="cursor: pointer;margin-right:8px" width="24"/></a>
<a href="#" target="_blank" rel="nofollow" title="Arabic" onclick="window.open('http://translate.google.com/translate?u='+encodeURIComponent(location.href)+'&langpair=auto%7car&hl=en'); return false;"><img alt="Arabic" border="0" align="absbottom" title="Arabic" height="24" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjskKjGs8IXHIS_qVdVBBoVwPFIoWTcRmMICljur9iT5PPHARajLT411tptVUhgEZB-Y0Oz-yG_ok0XBcvuFmKn3nvr6TW5BHuafEM3xkZh1u4oQpITL4RDmKrHSKqvz5GYovnlfKgBJ5Jj/s1600/Saudi+Arabia.png" style="cursor: pointer;margin-right:8px" width="24"/></a>
<a href="#" target="_blank" rel="nofollow" title="Chinese Simplified" onclick="window.open('http://translate.google.com/translate?u='+encodeURIComponent(location.href)+'&langpair=auto%7czh-cn&hl=en'); return false;"><img alt="Chinese Simplified" border="0" align="absbottom" title="Chinese Simplified" height="24" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhJwaN2LdmbIggy3nKidkAsNZub90Z1oCtWLnCL3LkQeSo86AjeemDtrJK8CfPP1i9pwoei56ptP7D9H5rXWtWMHDhaaJiwT_0GmEsg1XohYSRCsCvP1UGrsqbXyMA1UNwgmZXxu6I2NOuB/s1600/China.png" style="cursor: pointer;margin-right:8px" width="24"/></a>
<p><a href="#" id="example-hide"
onclick="showHide('example');return false;">Hide / </a><a href="http://helplogger.blogspot.com"><font size="1px">Get this widget</font></a></p>
</div>
</div>
[/code]
Bước 3 : Click save và hoàn tất.
Hy vọng là với nôi dung tốt bạn sẽ có thể thu hút nhiều khách viếng thăm blog của bạn đến từ nhiều quốc gia khác nhau.
Chúc các bạn thành công !
{ 0 nhận xét... read them below or add one }
Đăng nhận xét