How to Add Google Translate to your Blog

Adding a Google Translate button to your blog will definitely increase your blogs reader, because translating your blog will enable non-english readers to read and enjoy your blog. Also it will help you gain more traffic, because the search engines will show up your blog in search results whenever someone quaries in another language also. Here I am going to illustrate how you can add a Google translate gadget to your blog. Follow these steps:

1. Login to your blogger account and go to your Dashboard.
2. Click on 'Layout', then 'Ad a Gadget' link to add the gadget wherever you want.
3. From the pop-up window, select 'HTML/Javascript' to add a HTML/Javascript widget.
4. In the widget window, paste the following code copying from here:

<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/AVvXsEhBhU5V_UTlCa0Ptri_-3HkYJm2TivGy9eu61owbU4il0xVryIDrc8ZxoM_wvT14e8NVQcHQvjrVoGYclMuUlBdgtmj7zRsWNIp5cKK55qhyeCRmrzHBgVKc5dLL5KQGlu867vm0K4TBr7B/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/AVvXsEjmD-kUAihRqOYl2KzU_uEbTbCFkCZ_7Gwo912XomWD9E6D6fnta5anG8d0IFofbry0XFUnikWqwU-bimdffHRWHkU78Si_Pjlofg8HgH4qyQwYujLnVX9WjLxh5m4A-HlwuOCYqHhv1fnp/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/AVvXsEh5LLdAW1KfSLkHs3E0FyJXhuACRNkYjE9JbwAi8yDPYlYf227Q_NLfxEOq5wnlI6eADXBF7Xor4WneaanOJC5vekc_EgPPrTFwSj_5tq94jVBsy41FSwm1cNjwScQIUXU4vqxgaTXruzTE/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/AVvXsEjzSLBbuL4rXA4aB8tL0Vw2iLMQIngWrvFcWDzSqyw_Bq1bRPLWdTsOf9CW9ZacmGv6bF02QbkCLqxXwu7zIX8KFMUb6KrPIcG-PMCjumnHytuUkcWO4hCLvQ6Q8Xzk6QL4gC59IGtaOoaO/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/AVvXsEhxr9rFS1MD1S_1LWMguAJOf3r3CaCIBzVmZnVcft7DJ2TlZ_GeSwzlbfAX4FjvIQ_oZsJy6R0kbR-f1vwfQvWzbOD7ZX8sffcBlF6LyIFKgv0Tm7dc1ZL4hGFsyxHOacUFk6EpvF4hPE-n/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/AVvXsEg4y6_FTvssS2QZEW7uLVIJlPVD888IPS2z_pLnIAd-9E8cO1cshiwUWk0JNPAo07O4QR9NLkmF_96NDAG0plI_tLKF4E8xEjFxM4Mp61kJOQ631ADBtmOwI5FCyA4yrgTEYhCMzBOIc6d-/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/AVvXsEizYSXrfSEzBuZmpiZstfrwVlVDoKh-WZvXpGzEfcRIfAgZ1Ouxy-cnO_rDfq1RLHgRx67z2-HiDv4tw0xyTgtx_fUSXcRLEWWf9FMh10llVeAbfvRarJzMDOf7NfxJEbnsbdFnAfmaL7yG/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/AVvXsEhDzCg_-Fky9SefBJBSskdWH0-7qc2xhEds0Ewa98mhwvG9SZkk3oH4qUh2BW1c4EBSNwAN1YkK8fGgAulQPeKMATGAksnjaipap-OW11SRJ8sS5L6rEsbZX4V02sjFpr_rzy3okF2dgKfe/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/AVvXsEhQwvbpDO3VmL9OLtm9mH9e5oI4zDgAykUSZdy0I5cQkInPpnGeRNynd8srjJZpCWDnVGl13k4pWkfrVDcX0VHP0_POJU_QIcSd28b18SUAnivvqmlMVRlZ0lr-XzRN_ny3m3PVSakdrH6X/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/AVvXsEjaL-fufURlz-fPotwsRVSr9v2nDOVyChWbZ2dddm0EiD8iL2mZN8K7II0cfg4GfCo_39ekxuhsu-r7ks0OQH4kI5PtUcBjMYqX3Ty5ncyxl37YWnibdXqrHULjJMlu5DnHZQ8v68qyzKbY/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/AVvXsEh_cVffIpB6AhNz9wkrHV1OjFra9b9ygQD0RYrZykzn8olrfBHtzDGprq-dED3asVIBpj87nGu9O6b0bACSE1t-GzVVszKo2YGZRhMVFCUwu9QE2eu_vIStLoISQD4sGD16PX0XyRFy7cg4/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/AVvXsEjCzVRtsdPuYXSXswquke_nSrZgh9stwy4YfQTZQ1xMdPCCNjarHkmJYjMf5NC9JsbZFuBmoTcCJDIVWLrrbMVbHfEv771dczoKGkJpbkF6iHyJfDVF_ufDixPY0yaSglb5TpI1vFV_IKLk/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 / </a><a href="http://helplogger.blogspot.com"><font size="1px">Get this widget</font></a></p>
</div>
     </div>



5. Click 'Save'. You are done. Now you will see the Google Translate widget in your blog. It was quite easy, isn't it? Enjoy blogging!!