Tuesday, November 23, 2010

Widget Translate Bahasa Versi Bendera

Membuat Widget Translate Bahasa (Versi Bendera). Saya akan share yang versi bendera. Jadi nanti widgetnya muncul bendera-bendera negara, kalau bendera yang negara nya di klik maka blog sobat akan secara automatis di translate oleh Google Translate ke bahasa negara yang diklik tersebut .



Berikut ini kode untuk widgetnya :
<style>
.translate img {
filter:alpha(opacity=100);
-moz-opacity: 1.0;
opacity: 1.0;
border:0;
padding-left:0px;
}
.translate:hover img {
filter:alpha(opacity=50);
-moz-opacity: 0.50;
opacity: 0.50;
border:0;
}



</style>
<div style="text-align:center">
<a class="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="24"
src="http://b4r12y.files.wordpress.com/2010/11/uk-flag.png"
style="cursor: pointer;margin-right:8px"
width="24"/></a>

<a class="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="24"
src="http://b4r12y.files.wordpress.com/2010/11/france-flag.png"
style="cursor: pointer;margin-right:8px"
width="24"/></a>

<a class="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="24"
src="http://b4r12y.files.wordpress.com/2010/11/german-flag.png"
style="cursor: pointer;margin-right:8px"
width="24"/></a>

<a class="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="24"
src="http://b4r12y.files.wordpress.com/2010/11/spain-flag.png"
style="cursor: pointer;margin-right:8px"
width="24"/></a>

<a class="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="24"
src="http://b4r12y.files.wordpress.com/2010/11/italy-flag.png"
style="cursor: pointer;margin-right:8px"
width="24"/></a>

<a class="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="24"
src="http://b4r12y.files.wordpress.com/2010/11/dutch-flag.png"
style="cursor: pointer;margin-right:8px"
width="24"/></a>

<br/><br/>

<a class="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="24"
src="http://b4r12y.files.wordpress.com/2010/11/russian-flag.png"
style="cursor: pointer;margin-right:8px"
width="24"/></a>

<a class="translate" href="#" target="_blank" rel="nofollow"
title="Brazil"
onclick="window.open('http://translate.google.com/translate?u='+encodeURIComponent(location.href)+'&langpair=id%7Cpt&hl=en');
return false;"><img alt="Brazil" border="0"
align="absbottom" title="Brazilian" height="24"
src="http://b4r12y.files.wordpress.com/2010/11/brazil-flag.png"
style="cursor: pointer;margin-right:8px"
width="24"/></a>

<a class="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="24"
src="http://b4r12y.files.wordpress.com/2010/11/japan-flag.png"
style="cursor: pointer;margin-right:8px"
width="24"/></a>

<a class="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="24"
src="http://b4r12y.files.wordpress.com/2010/11/korean-flag.png"
style="cursor: pointer;margin-right:8px"
width="24"/></a>

<a class="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="24"
src="http://b4r12y.files.wordpress.com/2010/11/arab-flag.png"
style="cursor: pointer;margin-right:8px"
width="24"/></a>

<a class="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="24"
src="http://b4r12y.files.wordpress.com/2010/11/china-flag.png"
style="cursor: pointer;margin-right:8px"
width="24"/></a>
</div>

No comments:

Post a Comment