This widget also auto-detect your blog language and then translate it to the readers chosen language.
It supports 12 different languages:
English, French, German, Spanish, Italian, Dutch, Portuguese, Russian, Japanese, Korean, Arabic And Chinese.
How To Add The Google Translate Widget To Blogger
Step 1. Go to your Blogger Dashboard >> Layout and click on "Add A Gadget" link
Step 2. From the pop-up window, scroll down and choose HTML/JavaScript
Step 3. Paste the code below in the empty box:
<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 class="google_translate" 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/AVvXsEjzeWhMFGEJWnN0HPWKQscaZcW7yyNz3rqjJfYhXuRYOmhLfDaLwAsUECS_Td3BsJ8zk2lwSwDh3fKv-85BFCUqxaG3TeYMhxWGoYwll7n38JrhJ1fFB6UTHfOO3-3aKNXfDsMWAVehyphenhyphen9v-/s1600/United+Kingdom(Great+Britain).png" style="cursor: pointer;margin-right:8px" width="24"/></a>
<a class="google_translate" 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/AVvXsEgT5m3AJTxaTGOQVmLU4h7XkgMMbddhyphenhyphenThXr_WjnKsFAllTChLT4jsyHsTWsaQdJ0pitok3bCMMAhRY32xGidBl4FQ_t_nYEu-hLl8pGngQ9GiUYaIzUR_QiP9C77mi2JSeTQoXdAEVzro4/s1600/France.png" style="cursor: pointer;margin-right:8px" width="24"/></a>
<a class="google_translate" 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/AVvXsEj1JVLQD7Dwz3qXMi36JvU7QI3I8VaXlBODijPJwVK0VZjHLrlNXUck8VvaA2TRmNkxJrVExPWRraejvhceAXsJSSiXJ14XYODkejTGoJcfjMN9pCCkwpiGBPZF_somwc_ilVl_MVOr8eI3/s1600/Germany.png" style="cursor: pointer;margin-right:8px" width="24"/></a>
<a class="google_translate" 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/AVvXsEgORoSKD-9FdcJ0vSS6qp1B3f4e9VPwIKG5mchcc24f2kdzBwJjzLV0-eLBMeI92BiIEVUlMpH3bQaHsLA89HtcIA-8eMIe1YDfwC75Rf1aQe7CTdx4qqK6V5oXVlZt8XQxFf3e7CjYqW2G/s1600/Spain.png" style="cursor: pointer;margin-right:8px" width="24"/></a><a href="#" id="example-show" class="showLink"
onclick="showHide('example');return false;">More</a>
<div id="example" class="more">
<a class="google_translate" 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/AVvXsEhBTC0xC9wztu887uT_3pIHjQ1FqfjfrArg1zj0kHkdwBNveqSsqn49b9ERdASAgzVnLObXDzQkx-jx7dLEgY0nE2VduOUxFwhV8P-B8EEp1RXnOzZbIGUrz6c-9FmWzv454wAg2k67Ojtn/s1600/Italy.png" style="cursor: pointer;margin-right:8px" width="24"/></a>
<a class="google_translate" 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/AVvXsEjXz-5tZStj8t3JkFJjzZNnPWTkcHAC1UjL-nVeGseKgzNdcf74nEFzVxw_t9JPDqhViDWKvPzygWlvnXP_foYyDpORfb5uzPRYcN_BYONHsthfZEa9_po_gWiFNGfbunEugW3x_DD2fjgK/s1600/Netherlands.png" style="cursor: pointer;margin-right:8px" width="24"/></a>
<a class="google_translate" 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/AVvXsEg03GprsRynV8o4ogauenTkMiUWOMIZ57rA1YKvCBBOSvOa9OfkCG9oSB4z_ShEC8bmBj3qMN3V3wAuNcSN9o1klOGEFKlplF16s579jZZdygevDru1u9NbV2lerdIS7qJhSIrBipMZXbCP/s1600/Russian+Federation.png" style="cursor: pointer;margin-right:8px" width="24"/></a>
<a class="google_translate" 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/AVvXsEhgjlaPM_uA7ghbYnSuoSj6EJcuuwUay6y-CV8eIY0YjaUskTu9_Y79JQTTNKoyDScksiabmmT0yD4-aunq4fCLwuUTd3jdFMONORaEvvQZb6l3znsAA-1hLT4QBQqm7e5aSD3TLINnxbGl/s1600/Brazil.png" style="cursor: pointer;margin-right:8px" width="24"/></a>
<br />
<a class="google_translate" 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/AVvXsEjPTWS9OnteU-wKBfpaUvDrSPquzA1Y-iHw7Q6JHee4HDCw00HD6gf1p_Gva-Djx9X-N5SJJn3zy-onJNsyOYAb3M7eGcdofmS6rTGAkTh_Y0G6yft10boPPhCKJlrY79caHZ4rIN-Mip0f/s1600/Japan.png" style="cursor: pointer;margin-right:8px" width="24"/></a>
<a class="google_translate" 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/AVvXsEh_joD37enqG3kDvowmNv9t7WbOTsqFOLTGkM6MF3I-omJV11DGkkg9wscNysnki-shIYC8sNCFgDglVn3J1u9GT5GGGSxHZa7nj1FkHw0_Qbq63lKMbA-5cM48cZEfwNVNjf6jKdEBDaFd/s1600/South+Korea.png" style="cursor: pointer;margin-right:8px" width="24"/></a>
<a class="google_translate" 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/AVvXsEhFA6IccPWDLzywgVOgMsFeZPPcYYWt45sRWNH4NY2jYdRS2C3IDNqzqSV9gmvuP-q1YtopU-GVcrOsEHFfe7DNp7e1PySaRMLiuAjhP8zp_Wi17rk2bxLveUfwzBT5NwaXl8cRGJ_BM0hD/s1600/Saudi+Arabia.png" style="cursor: pointer;margin-right:8px" width="24"/></a>
<a class="google_translate" 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/AVvXsEiBfzzsru2JvyQbU6mgxuTMp64AkFBvIUlgq-BtLHeozHgxl3MQ41br3-KCzNiISvbf4YS5fhuTKBO8deJCVPBE0peJRe0BwqxGzAtdB8chI7hw4R-xfxzsgV_XOwlghLHlEmJZPFkymch_/s1600/China.png" style="cursor: pointer;margin-right:8px" width="24"/></a>
<p><a href="#" id="example-hide" class="hideLink"
onclick="showHide('example');return false;">Hide</p>
</div>
</div>
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 class="google_translate" 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/AVvXsEjzeWhMFGEJWnN0HPWKQscaZcW7yyNz3rqjJfYhXuRYOmhLfDaLwAsUECS_Td3BsJ8zk2lwSwDh3fKv-85BFCUqxaG3TeYMhxWGoYwll7n38JrhJ1fFB6UTHfOO3-3aKNXfDsMWAVehyphenhyphen9v-/s1600/United+Kingdom(Great+Britain).png" style="cursor: pointer;margin-right:8px" width="24"/></a>
<a class="google_translate" 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/AVvXsEgT5m3AJTxaTGOQVmLU4h7XkgMMbddhyphenhyphenThXr_WjnKsFAllTChLT4jsyHsTWsaQdJ0pitok3bCMMAhRY32xGidBl4FQ_t_nYEu-hLl8pGngQ9GiUYaIzUR_QiP9C77mi2JSeTQoXdAEVzro4/s1600/France.png" style="cursor: pointer;margin-right:8px" width="24"/></a>
<a class="google_translate" 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/AVvXsEj1JVLQD7Dwz3qXMi36JvU7QI3I8VaXlBODijPJwVK0VZjHLrlNXUck8VvaA2TRmNkxJrVExPWRraejvhceAXsJSSiXJ14XYODkejTGoJcfjMN9pCCkwpiGBPZF_somwc_ilVl_MVOr8eI3/s1600/Germany.png" style="cursor: pointer;margin-right:8px" width="24"/></a>
<a class="google_translate" 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/AVvXsEgORoSKD-9FdcJ0vSS6qp1B3f4e9VPwIKG5mchcc24f2kdzBwJjzLV0-eLBMeI92BiIEVUlMpH3bQaHsLA89HtcIA-8eMIe1YDfwC75Rf1aQe7CTdx4qqK6V5oXVlZt8XQxFf3e7CjYqW2G/s1600/Spain.png" style="cursor: pointer;margin-right:8px" width="24"/></a><a href="#" id="example-show" class="showLink"
onclick="showHide('example');return false;">More</a>
<div id="example" class="more">
<a class="google_translate" 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/AVvXsEhBTC0xC9wztu887uT_3pIHjQ1FqfjfrArg1zj0kHkdwBNveqSsqn49b9ERdASAgzVnLObXDzQkx-jx7dLEgY0nE2VduOUxFwhV8P-B8EEp1RXnOzZbIGUrz6c-9FmWzv454wAg2k67Ojtn/s1600/Italy.png" style="cursor: pointer;margin-right:8px" width="24"/></a>
<a class="google_translate" 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/AVvXsEjXz-5tZStj8t3JkFJjzZNnPWTkcHAC1UjL-nVeGseKgzNdcf74nEFzVxw_t9JPDqhViDWKvPzygWlvnXP_foYyDpORfb5uzPRYcN_BYONHsthfZEa9_po_gWiFNGfbunEugW3x_DD2fjgK/s1600/Netherlands.png" style="cursor: pointer;margin-right:8px" width="24"/></a>
<a class="google_translate" 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/AVvXsEg03GprsRynV8o4ogauenTkMiUWOMIZ57rA1YKvCBBOSvOa9OfkCG9oSB4z_ShEC8bmBj3qMN3V3wAuNcSN9o1klOGEFKlplF16s579jZZdygevDru1u9NbV2lerdIS7qJhSIrBipMZXbCP/s1600/Russian+Federation.png" style="cursor: pointer;margin-right:8px" width="24"/></a>
<a class="google_translate" 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/AVvXsEhgjlaPM_uA7ghbYnSuoSj6EJcuuwUay6y-CV8eIY0YjaUskTu9_Y79JQTTNKoyDScksiabmmT0yD4-aunq4fCLwuUTd3jdFMONORaEvvQZb6l3znsAA-1hLT4QBQqm7e5aSD3TLINnxbGl/s1600/Brazil.png" style="cursor: pointer;margin-right:8px" width="24"/></a>
<br />
<a class="google_translate" 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/AVvXsEjPTWS9OnteU-wKBfpaUvDrSPquzA1Y-iHw7Q6JHee4HDCw00HD6gf1p_Gva-Djx9X-N5SJJn3zy-onJNsyOYAb3M7eGcdofmS6rTGAkTh_Y0G6yft10boPPhCKJlrY79caHZ4rIN-Mip0f/s1600/Japan.png" style="cursor: pointer;margin-right:8px" width="24"/></a>
<a class="google_translate" 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/AVvXsEh_joD37enqG3kDvowmNv9t7WbOTsqFOLTGkM6MF3I-omJV11DGkkg9wscNysnki-shIYC8sNCFgDglVn3J1u9GT5GGGSxHZa7nj1FkHw0_Qbq63lKMbA-5cM48cZEfwNVNjf6jKdEBDaFd/s1600/South+Korea.png" style="cursor: pointer;margin-right:8px" width="24"/></a>
<a class="google_translate" 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/AVvXsEhFA6IccPWDLzywgVOgMsFeZPPcYYWt45sRWNH4NY2jYdRS2C3IDNqzqSV9gmvuP-q1YtopU-GVcrOsEHFfe7DNp7e1PySaRMLiuAjhP8zp_Wi17rk2bxLveUfwzBT5NwaXl8cRGJ_BM0hD/s1600/Saudi+Arabia.png" style="cursor: pointer;margin-right:8px" width="24"/></a>
<a class="google_translate" 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/AVvXsEiBfzzsru2JvyQbU6mgxuTMp64AkFBvIUlgq-BtLHeozHgxl3MQ41br3-KCzNiISvbf4YS5fhuTKBO8deJCVPBE0peJRe0BwqxGzAtdB8chI7hw4R-xfxzsgV_XOwlghLHlEmJZPFkymch_/s1600/China.png" style="cursor: pointer;margin-right:8px" width="24"/></a>
<p><a href="#" id="example-hide" class="hideLink"
onclick="showHide('example');return false;">Hide</p>
</div>
</div>
Step 4. Now click on Save
And you're done! Enjoy (:
0 Response to "Google Translate Widget with Flags For Blogger"
Post a Comment