20 Apr 2013

Memasang widget Translator

Sesuai dengan namanya. Widget ini berfungsi untuk menerjemahkan bahasa yang satu ke bahasa yang lain. Dengan memasang widget ini, maka pengunjung yang berasal dari negara lain juga bisa menikmati konten diblog anda. Selain itu, anda juga bisa memanfaatkan widget ini untuk belajar bahasa asing lho. Menarikkan?

Sebenarnya google translate ini sudah pernah saya bahas pada beberapa waktu yang lalu. Namun karena widget ini sudah mengalami perubahan yaitu menggunakan icon-icon bendera sehingga tampilannya menjadi lebih menarik.

Contohnya seperti ini yang dibuat oleh mad tomatoe



dan ini yang dibuat oleh kang rohman



Oleh sebab itu, pada postingan ini saya ingin membahas kembali dengan menyajikan widget buatan saya sendiri. Seperti yang dibawah ini



Widget ini saya buat dengan mengganti icon bendera yang berbentuk seperti pin dan diberi sedikit efek shadow sehingga hasilnya menjadi seperti diatas. Semoga tidak terlalu mengecewakan.

Bagi anda yang tertarik, silahkan copy kode dibawah ini.

Untuk Google Translate 2 baris. Gunakan kode dibawah ini:



<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="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjZa6G4O30SOVRGVJJu5SmlWhf6hlAikrWZSZ3HUlwWcI_ctmDQ0wuJhhV5FBOQbLCXm0oGW_9_iBpb69fToiHwhdCYQWJ5FNXJGCnOYy46F6mRzjT_aUp7v1vYPdpQRD22PHKfbK4PCEcS/s144/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="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgF3c8L6GsqWSPYCMSRb-l7k5hy-VJbWrFy0ylZOsATNkSb1Z1Nfr2fFlMrm0YWYcZSJqhkhASwlg5yH0bGlKcMIiQiM0XBBvYVf4s25mx6OaGBkX3j6I5429ozlIg9gm5zpjtCYYH-6geX/s144/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="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhyZ4t9X6PPbGZfFQYJFJGj7Dk03R0by5h6VqILVsjfuBZPjqYym773j_fR3Ak9uWonFAbwFZxifRxh32eEV4PQbOP-nyMBnEbb1kW54Dd5CNQrMOAOzmF4yGmKNZx75iBTau2ZGGlAepDV/s144/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="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjl7XjgK0DNSu8VR0WQ68s7BRPkOLhm2IppJGxdaD5myBIJaV6St1muzenR46qtvkr9tGxmM8jUjGEIQQBp0veQTvobax6hXInTdB7WQcymHTE9opNZgoceGf3qBZ0q_nUKsd1BwMjJNRYe/s144/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="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhU6GcqSbarQqMBi9EGTGL982KkDR06yOej-SzWKplS0Us7HY4K6CpljqMGcAnkm1WQr0WhFgUyF25_G-XLHHV7o6FTwusFcNINg1YHCh1uRriQ7W-M_Px7aVr73xmLjegWGuPwr8NROIrl/s144/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="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjYl4L-jk7pZj3n7vpbpEdGSwCqpoLyJl3UxONcPYqL7tp-mH8j4B8zrZp3JD3GUJT3TLvHRPwOySe32HNQPHYZm5GqyLDGRcPjK8jklfBkgL3uMTlcsBIIPvTxeK9Mql8mnjC4xdHr161k/s144/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="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgqA3YnpkNTFcsLIrThhDEbsVIJ02M7ft9VF74ktX7mM30VKj7L6ahYxTtYT4m7C8Is5qh3KR7SXRZSH9C2Uv22GX4-ipZdjbcy042Wl8MleQ0T9L4XppYg29DOfqJeHdOz3dhdRFrFQOpf/s144/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="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjsBcyPprC72BRyS5ULMf39nzTMG77eRnKtK20Tg1CmpHIfNXup1GACtu7tEuXqp0VivlD_Rs2R0LM8ZRZALCHovbmG_cJUtpwlrOlQGawcV3ybZed49rRdDfRt7DZ_JgP1zt7ErjPCh92i/s144/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="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiJwgvkSRVV1rqYlmfVo4fxLPrGouX1KkfPIr5FOE-ld6s3YKTA0nWp6JrGDPk3CD_Fa5tABEFx34D1QvcJejPHC20mHXUZMQ7qCjQGa3ayRHtklKIYTvUAJPVmn2aVowOkMtQ6wQmUTGku/s144/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="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgreh4rYq4K3nJLyheVA9QnGOlRlliJqWJhI21P89HEs7vcFTF0nj5bmm_T3zAmGWe7W6byDpoluCuN6a8ttwBEnOZYxTJ9f2hXUY5Z9_VYYlXLPColmwywOU4il36eBTSy9Qx_4Tahpp5g/s144/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="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjrWMKnWOJQ94SZm4-F8ddbkBwBcPt2pETn0YYCpnHhL7YKgFmftewCUQ8YwwKz4jPKIBX7WUnWpfFUrjpDeUSzBtXKydyf36RyLha_a1OG31qMOBxQPka2x6TRCYOM86scFCpo0f0xAgK6/s144/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="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgpQolu3tIm7cdp35nheHB_NlnqGezuIokAGr6jPgaGcD18li8GdQ8UnUIwK1VHjObFq7kCYZflKdx3j6BHsNcJ1qqnXVUSR2xN7CWqCqXu8ruBKhqi_KNvehTkGgfuBDP1TFey4WV8tzDf/s144/china-flag.png" style="cursor: pointer;margin-right:8px" width="24"/></a>

<div style="font-size:9px; padding:8px 0px 0px 0px">
<a href="http://www.hermanblog.com/2009/03/memasang-widget-google-translate-pada.html" target="_blank">Translate Widget</a> by Google
</div></div>


Untuk Google Translate 3 baris. Gunakan kode dibawah ini:




<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="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjZa6G4O30SOVRGVJJu5SmlWhf6hlAikrWZSZ3HUlwWcI_ctmDQ0wuJhhV5FBOQbLCXm0oGW_9_iBpb69fToiHwhdCYQWJ5FNXJGCnOYy46F6mRzjT_aUp7v1vYPdpQRD22PHKfbK4PCEcS/s144/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="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgF3c8L6GsqWSPYCMSRb-l7k5hy-VJbWrFy0ylZOsATNkSb1Z1Nfr2fFlMrm0YWYcZSJqhkhASwlg5yH0bGlKcMIiQiM0XBBvYVf4s25mx6OaGBkX3j6I5429ozlIg9gm5zpjtCYYH-6geX/s144/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="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhyZ4t9X6PPbGZfFQYJFJGj7Dk03R0by5h6VqILVsjfuBZPjqYym773j_fR3Ak9uWonFAbwFZxifRxh32eEV4PQbOP-nyMBnEbb1kW54Dd5CNQrMOAOzmF4yGmKNZx75iBTau2ZGGlAepDV/s144/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="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjl7XjgK0DNSu8VR0WQ68s7BRPkOLhm2IppJGxdaD5myBIJaV6St1muzenR46qtvkr9tGxmM8jUjGEIQQBp0veQTvobax6hXInTdB7WQcymHTE9opNZgoceGf3qBZ0q_nUKsd1BwMjJNRYe/s144/spain-flag.png" style="cursor: pointer;margin-right:8px" width="24"/></a>
<br/><br/>
<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="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhU6GcqSbarQqMBi9EGTGL982KkDR06yOej-SzWKplS0Us7HY4K6CpljqMGcAnkm1WQr0WhFgUyF25_G-XLHHV7o6FTwusFcNINg1YHCh1uRriQ7W-M_Px7aVr73xmLjegWGuPwr8NROIrl/s144/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="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjYl4L-jk7pZj3n7vpbpEdGSwCqpoLyJl3UxONcPYqL7tp-mH8j4B8zrZp3JD3GUJT3TLvHRPwOySe32HNQPHYZm5GqyLDGRcPjK8jklfBkgL3uMTlcsBIIPvTxeK9Mql8mnjC4xdHr161k/s144/dutch-flag.png" style="cursor: pointer;margin-right:8px" width="24"/></a>

<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="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgqA3YnpkNTFcsLIrThhDEbsVIJ02M7ft9VF74ktX7mM30VKj7L6ahYxTtYT4m7C8Is5qh3KR7SXRZSH9C2Uv22GX4-ipZdjbcy042Wl8MleQ0T9L4XppYg29DOfqJeHdOz3dhdRFrFQOpf/s144/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="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjsBcyPprC72BRyS5ULMf39nzTMG77eRnKtK20Tg1CmpHIfNXup1GACtu7tEuXqp0VivlD_Rs2R0LM8ZRZALCHovbmG_cJUtpwlrOlQGawcV3ybZed49rRdDfRt7DZ_JgP1zt7ErjPCh92i/s144/brazil-flag.png" style="cursor: pointer;margin-right:8px" width="24"/></a>
<br/><br/>
<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="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiJwgvkSRVV1rqYlmfVo4fxLPrGouX1KkfPIr5FOE-ld6s3YKTA0nWp6JrGDPk3CD_Fa5tABEFx34D1QvcJejPHC20mHXUZMQ7qCjQGa3ayRHtklKIYTvUAJPVmn2aVowOkMtQ6wQmUTGku/s144/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="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgreh4rYq4K3nJLyheVA9QnGOlRlliJqWJhI21P89HEs7vcFTF0nj5bmm_T3zAmGWe7W6byDpoluCuN6a8ttwBEnOZYxTJ9f2hXUY5Z9_VYYlXLPColmwywOU4il36eBTSy9Qx_4Tahpp5g/s144/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="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjrWMKnWOJQ94SZm4-F8ddbkBwBcPt2pETn0YYCpnHhL7YKgFmftewCUQ8YwwKz4jPKIBX7WUnWpfFUrjpDeUSzBtXKydyf36RyLha_a1OG31qMOBxQPka2x6TRCYOM86scFCpo0f0xAgK6/s144/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="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgpQolu3tIm7cdp35nheHB_NlnqGezuIokAGr6jPgaGcD18li8GdQ8UnUIwK1VHjObFq7kCYZflKdx3j6BHsNcJ1qqnXVUSR2xN7CWqCqXu8ruBKhqi_KNvehTkGgfuBDP1TFey4WV8tzDf/s144/china-flag.png" style="cursor: pointer;margin-right:8px" width="24"/></a>

<div style="font-size:9px; padding:8px 0px 0px 0px">
<a href="http://www.hermanblog.com/2009/03/memasang-widget-google-translate-pada.html" target="_blank">Translate Widget</a> by Google
</div></div>


1. Kalau sudah, buka kotak HTML/ javascript lalu pastekan kodenya kedalam kotak.

2. Klik Save. Selesai. Silahkan lihat hasilnya.


Jika anda merasa letaknya kurang pas dengan kolom sidebar anda. Anda bisa menyesuaikan jaraknya dengan mengganti nilai 0 pada padding-left. Semakin tinggi nilainya semakin lebar jaraknya. Dan jika anda ingin mengganti icon benderanya dengan icon lain. Silahkan ganti tulisan bewarna merah dengan alamat url icon anda.

Selamat mencoba. Semoga bermanfaat..

2 komentar:

don't Forget to COMMENT