Jumat, 27 Mei 2011

Memasang Widget Google Translate Pada Blog

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/AVvXsEiJW1bHMcBf8klsqrCBmEJ-VgxBF65SiAWKp7W7LZpG5yQ05W4AV_eoIK6TYQCliUg1cYThCJu3h_r6qSfoWq3TP4bCPjJRU1aVAMUXJfXK973OfKWZ47xs5kByF2Jf6afLbqJ1mstzJiHf/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/AVvXsEgxN6S2nB8nzSQJg-ZC2ijTsuqVyLRQxqeLPjCuL7ddSpJ-znEjfUhfIta_shss8qhaQMiRQvUdJoIc5tUx9DHaSs0OgF8gEUETy8buTZlxR6W_XRqInYveAJ7eCED9NhDH3sUGKEv68o3H/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/AVvXsEgaMphZMNbGfQryosJeRH0XzWjPrtxlS5Vif2HrEB_kKo4G-9ggHJJvJZ-DaQiHIkePASEfNd7Y1oz6-ppr6Bn3SaqJSwIFdNVDqge-IhQnNdKQ_22beX5dexstQOC4UtWffZOr9aN898WR/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/AVvXsEivrXOGb31cCZW5tjK8dVy62i-Z8F89g2IMUa-hLyRbchaONi4iV2GG72YuYHDpn4P19-tQdlBLSDvZJoyU4HHF9whv7xAuLTPhSbPPVJ1-Nu8e830rq-vnHUrjT42yD6r5PsDN_FXkZDj3/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/AVvXsEgcFDAcc_05muiq2XeTYyRN1_d52JXIh1eji4v1f_JhdH5PoOpuMnjM2CM4gs4AuE8s2_gWiIxm5vCR-nyui-Sq3NLmUrzZg960s65Auh2-Pewjh84us1ef2kdexwuwAJ6T9RqEWa968OOY/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/AVvXsEhdqDcxynQG_vEZ6l1viv2EBxharwCWelmw1zHN2tLpRsWYxp9aLbJ8beSJWktMa3PsTShrb-T5Y4FkTT35SxcH_rqup-BSUglFTqgQV18Xo4r6vMF7BfAgwMKqqhPdBiSz26uHMQCPBW15/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/AVvXsEiULxRu1eNr9WseE1-ytGlJEdIoMpNrQRU6sBmOWaXSrDHdP6xf8XR2NryLG9uBF71SG7ZcJhNudHMvBGF1fO-tNbrCGUFl4WNFXyyk3NtNKABYJncQSMXsaZx5cVH_ueCWuoLIglF-zCyu/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/AVvXsEj5BteqaIZidE79ph2EpQhiHebOUWIRl8U1ajc3pS9MRO_b9-aE_iSx_1KQsu5okz9fzCIV5CqPZLpFvxSx1L4VV7W5Pk4XyZ4Tguk4QGPlOR05E75M6GURU1WpQiZ_H6ZOA7iWmpTHGxct/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/AVvXsEiYLRVBfhkNZClKslGt98-DD6_NA8DfILAtiJcsBfmIAlgFio2HX6VwSU8ixM7PAVWh8BQ6xAnRX3UQt88hjpl3bCFHa0hwA_JBVNnwBNsxhSF6M23YivV4IvRAS2aMtSd42-uXW1pDxJnL/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/AVvXsEheTcxC0HgIH-2M_4Z4LRMLGUs_siwUZ5FcEsk33pmv8edlRmAKWccAMMzbBlOCcf9dTf88yPWAtajXRY657kyupmphEPU5O3qAfqGytRGO415EreF29XgNAlHX4IqZ9ocQxvWRhLAbJR7i/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/AVvXsEjfT2VbWU25Dul7jUNEZRAOpXq-MCa7mnRUF5I4WcBn5QXNRzDtOER_O63ndp5gRrU9vFuSevlLQ6j-1itFaCc4HmiQh-wAyH1zJW-o-2jPdSfH0AWOU4nHQAiWuM4RNQqAs6wAo33Q54w9/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/AVvXsEh8Sp_UIize2Ji62IxrqwksO10svV1sYsle7h2ruon3lDZCitk8wiCRhtd1KMuVRniEjYb_IS9CbTooEWNqqF897tBIeY836RxM_gQI0XKGuaQp0SZkByMiPLqQmGDVUE9d4262icVLq7j1/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/AVvXsEiJW1bHMcBf8klsqrCBmEJ-VgxBF65SiAWKp7W7LZpG5yQ05W4AV_eoIK6TYQCliUg1cYThCJu3h_r6qSfoWq3TP4bCPjJRU1aVAMUXJfXK973OfKWZ47xs5kByF2Jf6afLbqJ1mstzJiHf/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/AVvXsEgxN6S2nB8nzSQJg-ZC2ijTsuqVyLRQxqeLPjCuL7ddSpJ-znEjfUhfIta_shss8qhaQMiRQvUdJoIc5tUx9DHaSs0OgF8gEUETy8buTZlxR6W_XRqInYveAJ7eCED9NhDH3sUGKEv68o3H/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/AVvXsEgaMphZMNbGfQryosJeRH0XzWjPrtxlS5Vif2HrEB_kKo4G-9ggHJJvJZ-DaQiHIkePASEfNd7Y1oz6-ppr6Bn3SaqJSwIFdNVDqge-IhQnNdKQ_22beX5dexstQOC4UtWffZOr9aN898WR/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/AVvXsEivrXOGb31cCZW5tjK8dVy62i-Z8F89g2IMUa-hLyRbchaONi4iV2GG72YuYHDpn4P19-tQdlBLSDvZJoyU4HHF9whv7xAuLTPhSbPPVJ1-Nu8e830rq-vnHUrjT42yD6r5PsDN_FXkZDj3/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/AVvXsEgcFDAcc_05muiq2XeTYyRN1_d52JXIh1eji4v1f_JhdH5PoOpuMnjM2CM4gs4AuE8s2_gWiIxm5vCR-nyui-Sq3NLmUrzZg960s65Auh2-Pewjh84us1ef2kdexwuwAJ6T9RqEWa968OOY/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/AVvXsEhdqDcxynQG_vEZ6l1viv2EBxharwCWelmw1zHN2tLpRsWYxp9aLbJ8beSJWktMa3PsTShrb-T5Y4FkTT35SxcH_rqup-BSUglFTqgQV18Xo4r6vMF7BfAgwMKqqhPdBiSz26uHMQCPBW15/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/AVvXsEiULxRu1eNr9WseE1-ytGlJEdIoMpNrQRU6sBmOWaXSrDHdP6xf8XR2NryLG9uBF71SG7ZcJhNudHMvBGF1fO-tNbrCGUFl4WNFXyyk3NtNKABYJncQSMXsaZx5cVH_ueCWuoLIglF-zCyu/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/AVvXsEj5BteqaIZidE79ph2EpQhiHebOUWIRl8U1ajc3pS9MRO_b9-aE_iSx_1KQsu5okz9fzCIV5CqPZLpFvxSx1L4VV7W5Pk4XyZ4Tguk4QGPlOR05E75M6GURU1WpQiZ_H6ZOA7iWmpTHGxct/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/AVvXsEiYLRVBfhkNZClKslGt98-DD6_NA8DfILAtiJcsBfmIAlgFio2HX6VwSU8ixM7PAVWh8BQ6xAnRX3UQt88hjpl3bCFHa0hwA_JBVNnwBNsxhSF6M23YivV4IvRAS2aMtSd42-uXW1pDxJnL/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/AVvXsEheTcxC0HgIH-2M_4Z4LRMLGUs_siwUZ5FcEsk33pmv8edlRmAKWccAMMzbBlOCcf9dTf88yPWAtajXRY657kyupmphEPU5O3qAfqGytRGO415EreF29XgNAlHX4IqZ9ocQxvWRhLAbJR7i/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/AVvXsEjfT2VbWU25Dul7jUNEZRAOpXq-MCa7mnRUF5I4WcBn5QXNRzDtOER_O63ndp5gRrU9vFuSevlLQ6j-1itFaCc4HmiQh-wAyH1zJW-o-2jPdSfH0AWOU4nHQAiWuM4RNQqAs6wAo33Q54w9/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/AVvXsEh8Sp_UIize2Ji62IxrqwksO10svV1sYsle7h2ruon3lDZCitk8wiCRhtd1KMuVRniEjYb_IS9CbTooEWNqqF897tBIeY836RxM_gQI0XKGuaQp0SZkByMiPLqQmGDVUE9d4262icVLq7j1/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..

@http://www.hermanblog.com/2009/03/memasang-widget-google-translate-pada.html

0 comment:

Posting Komentar