Sunday, April 28, 2013

Memasang Widget Google Translate Pada Blog

Posted by Fhianjunioron Saturday, March 14, 2013
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. sengihnampakgigi

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/AVvXsEidB4cEeyYw9MEDJcFdgbHrda5yxW_D_78OtyOqPJXJ4eYBI8O86uqMgZclbtUzWS0y6oOq2C3g2hXgVbi567fkcaKzxJ5YJYl_EalrHh-ojSPTZuUm6koWmQwhyphenhyphen6Bhgr3eEJS-ONUKrhci/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/AVvXsEgzD9QVoM-0DXpdMelefiClS-X26DSA20uSmFOT8SvworQfKS309lA-VuAi7Ka1I-HQ_FHmw2GVJY-2ApWjbbC7lkts1KahIvY_emxDjzTRkAYljK1g1BiVnZ8tjQ1Y0PSePH3N1BCrM1Wg/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/AVvXsEhib_iCylnUYdSsa7aNRo_eHpUBi4-nrdDCyBX47q-yHLJWAOxDSefj5s-L2KMj_2Kjy4srNwFGdHE7ffaeLGNfi_LdH4-eHP3GEALn0H45kVhPBW3RkwletFwPBUbZ46Bd61rOhX6Yj30T/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/AVvXsEhi_LFtf0y3SncpZupCJp5OpxYKdL9tGqKl1wMtbR_FtrZHMlOqi-_OOkNu1PWum5BvRY40znjIeKYBx-Lxtfd1dPdp93yD_hBUjRzA5kKj3_qEO2cc3nBUacmwRXtlEdfopUTpk7Mdawip/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/AVvXsEiUZUfTxhUFh6BZvP-SJ2ZMIo1RltpudLnrsY-c4zDiaY8JdZ4h5WVkahZWIsm6_GyicHo7YZk9Pbyy_LgVR3qL4d3P46pIEtp4o-WBvND9TBLgWcbKKrev0fLuACAyPI_idiJYlgJUdmD-/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/AVvXsEjsjSQMcy4L56NfrIpdiJGRsb5Vdtwq-4vmUD7KJD8HSz5yqmfmwC6bkmPTOR6j-8E_rHqxfTMRXsXC4Y5vl1amF5RUNs3B9gfpkXv0Qd44iiJqbAyzdQfkV1F2KOXwTKC4tV_e9jZOPUEg/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/AVvXsEgHr0FKDxCgXpVLW2CSPqPEbk9Dwpcp67d5Djwe2kJI819qqmmvigfJYZkl8EzjfW4jXRBxW_egS2WA0e-8ZMVLOr7L9ihDJ3Ks2P5-eyOx8oFRt-X0LIz8mrLobtoUkrOcNG2uAua9c0OO/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/AVvXsEgHjmVfIfl-z5VNvKNA8htXNCxwllaPpxMjQJBA7oyaA8AH7voj6JZX9eGAKb6CTeuMuVzFuP7pgzDNtUnDxVH2fbIDk0_I4npMvsS9MzxFK6F5Vd9U_G3Omk_V48WmGHjvJMgVxn49OvmB/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/AVvXsEje3Z0x8WwTOtS-bXNlV5qgGBeiXD5mgDaCsj_bH8eg4KeF4VXRnX4mZD8XVAuMsKGO7Unh3CGYmgUKB5EkvSF5cNI7JLliYYs_qkCUDHCELYC3oOEJvFKh3IjNhTh8dV8aj4T8GM0KEZsy/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/AVvXsEgDJrKBAsyCKPzrNayihJAHwirVG-4EbWYYhdPzskQ-aoSxSwD8QYvNPGf4BIcivYdlTTAiMoL2drxM1CV8qa1cdnOVm0Km-wboRcLgbgRklcuWbzV8NstXPHXgzN8sEmnI00rBI47tJlXy/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/AVvXsEgKd6aygEwsji_Ld7k2zndhr1tMJNeIpHObJrARwkUcvQ_7Cbs_85ejd0XQmH0omCHMrWyDfI2c4wdu95Svxvx89690u_GoNp77ERmw0bwwIuH7spNqFwGlUER-6Q5hA4iRA4llY8RfFj7H/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/AVvXsEjRGhyphenhyphenLIOHmeRCjcsL9cgmpUV5vj16jXKQu2vei1KVmvF2TbaZW7TrXRVftNHXNXd5TMmYxK3TxkZtGWimNaAihb5r3P72CceXWyyxxqph912H0zow_G-Wrpedso4W6TuEN8-FF8YMmlb7v/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:

google translate widget









<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/AVvXsEidB4cEeyYw9MEDJcFdgbHrda5yxW_D_78OtyOqPJXJ4eYBI8O86uqMgZclbtUzWS0y6oOq2C3g2hXgVbi567fkcaKzxJ5YJYl_EalrHh-ojSPTZuUm6koWmQwhyphenhyphen6Bhgr3eEJS-ONUKrhci/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/AVvXsEgzD9QVoM-0DXpdMelefiClS-X26DSA20uSmFOT8SvworQfKS309lA-VuAi7Ka1I-HQ_FHmw2GVJY-2ApWjbbC7lkts1KahIvY_emxDjzTRkAYljK1g1BiVnZ8tjQ1Y0PSePH3N1BCrM1Wg/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/AVvXsEhib_iCylnUYdSsa7aNRo_eHpUBi4-nrdDCyBX47q-yHLJWAOxDSefj5s-L2KMj_2Kjy4srNwFGdHE7ffaeLGNfi_LdH4-eHP3GEALn0H45kVhPBW3RkwletFwPBUbZ46Bd61rOhX6Yj30T/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/AVvXsEhi_LFtf0y3SncpZupCJp5OpxYKdL9tGqKl1wMtbR_FtrZHMlOqi-_OOkNu1PWum5BvRY40znjIeKYBx-Lxtfd1dPdp93yD_hBUjRzA5kKj3_qEO2cc3nBUacmwRXtlEdfopUTpk7Mdawip/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/AVvXsEiUZUfTxhUFh6BZvP-SJ2ZMIo1RltpudLnrsY-c4zDiaY8JdZ4h5WVkahZWIsm6_GyicHo7YZk9Pbyy_LgVR3qL4d3P46pIEtp4o-WBvND9TBLgWcbKKrev0fLuACAyPI_idiJYlgJUdmD-/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/AVvXsEjsjSQMcy4L56NfrIpdiJGRsb5Vdtwq-4vmUD7KJD8HSz5yqmfmwC6bkmPTOR6j-8E_rHqxfTMRXsXC4Y5vl1amF5RUNs3B9gfpkXv0Qd44iiJqbAyzdQfkV1F2KOXwTKC4tV_e9jZOPUEg/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/AVvXsEgHr0FKDxCgXpVLW2CSPqPEbk9Dwpcp67d5Djwe2kJI819qqmmvigfJYZkl8EzjfW4jXRBxW_egS2WA0e-8ZMVLOr7L9ihDJ3Ks2P5-eyOx8oFRt-X0LIz8mrLobtoUkrOcNG2uAua9c0OO/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/AVvXsEgHjmVfIfl-z5VNvKNA8htXNCxwllaPpxMjQJBA7oyaA8AH7voj6JZX9eGAKb6CTeuMuVzFuP7pgzDNtUnDxVH2fbIDk0_I4npMvsS9MzxFK6F5Vd9U_G3Omk_V48WmGHjvJMgVxn49OvmB/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/AVvXsEje3Z0x8WwTOtS-bXNlV5qgGBeiXD5mgDaCsj_bH8eg4KeF4VXRnX4mZD8XVAuMsKGO7Unh3CGYmgUKB5EkvSF5cNI7JLliYYs_qkCUDHCELYC3oOEJvFKh3IjNhTh8dV8aj4T8GM0KEZsy/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/AVvXsEgDJrKBAsyCKPzrNayihJAHwirVG-4EbWYYhdPzskQ-aoSxSwD8QYvNPGf4BIcivYdlTTAiMoL2drxM1CV8qa1cdnOVm0Km-wboRcLgbgRklcuWbzV8NstXPHXgzN8sEmnI00rBI47tJlXy/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/AVvXsEgKd6aygEwsji_Ld7k2zndhr1tMJNeIpHObJrARwkUcvQ_7Cbs_85ejd0XQmH0omCHMrWyDfI2c4wdu95Svxvx89690u_GoNp77ERmw0bwwIuH7spNqFwGlUER-6Q5hA4iRA4llY8RfFj7H/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/AVvXsEjRGhyphenhyphenLIOHmeRCjcsL9cgmpUV5vj16jXKQu2vei1KVmvF2TbaZW7TrXRVftNHXNXd5TMmYxK3TxkZtGWimNaAihb5r3P72CceXWyyxxqph912H0zow_G-Wrpedso4W6TuEN8-FF8YMmlb7v/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.. ,,,

fhian junior

0 komentar:

Post a Comment