Google Translate Widget with Flags For Blogger


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/AVvXsEjAIrpfhlB0y_QuDGOL8OQr4ztDXlSfUC5kSEC6LaimTEilc8fBdj-ek73kZd4Q1o7IH9B00nqOEcXJyNSSX_X-pYtZccvVyaTAOTY7v2DxUx-pep-yUufLkS1iHff-17GT5jGeLTqTAj2t/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/AVvXsEhnqTHt0Z8WmJv4E0UZ-ran-XFWqeKLc1Y2-nwYZdBWQsH1852TgfGHQo8NuaAWzq1-Ir6BjAPyrkAIqsvqly5ANSwNPIFT4gdUHusWDxGAZ_-rEEf03WCbquopiAfpjmm60wUuM1q24UgP/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/AVvXsEiWyiUSzSdVZucF8hOGJHUvJMgN6uVoEZ3ShMXwMh1bi2D6CxxcsKtO1Qif3y9yUuCrDZPJoaOJNsxrRj5PUvaFLbaLU7qVVhWROqy0YHctJ0m2yQ0bBiuqx7lLacEUybKKWvzJ0IcwRPAn/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/AVvXsEjVQltTaCdXXNZQWItiXCPnohzyVC-WXRq2E1RT1Ev0yXn83kw4jYcYRUE5PZK5zmQJ1GOWwjLfStBriIFEf6iw7GZF8AUpyL_gmxYbKp1sohVOozaz1zQM0-uwxzfSWtfp0BRMaUa9GAFk/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/AVvXsEhEYwyRwE_5y4RB8B6KKw7gZlN3nJtRqTfQHQYigIROPHL1VUwDYRVM2f9OTxSZUcpXqgj4Sh9gucIrhniyEseC8jwDl_PBEG8HR2g4YSSAuWkAJtYiE3Jjz3pprgEo0CScimZ5_WQoyc0V/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/AVvXsEj9xN__o6JXcENh2DlYA8LJBJjPqobWp0vIHOvHh6hWEuK45f1I3TbJBSHIR81wbkV_BWfir1DsU6NrrU1fGuWuUX_CaV1w_VmU36Cf89yh1wlbKbf47lh92wwIxV-QnE1T-r1rdTEbuTjP/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/AVvXsEhGkRRCFQH2FhoF_77x75Ausl51QFZwfENsf1e9eMj2CyckEXfgjDVpKSSZOm6yJoNVQQTuPZouKxh6_swM_dMS6Fij0DFb7Q3PTYHXJ53gY3pw7WclmZ_NOWoUbzqpzj5B4Y488ogVWNaJ/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/AVvXsEgmsF5bRhqJGZPigfXKGYwGlGHL-bC0b5CH-z1RT6KyIfrat7VbKUbpvYV7H-F39ucCVE0vTKvflbtdhLNOMri2RCpf-gdCdGO1QKgAys9EgGspCo0dK6zjsteAZFGUTXUlQEZadOhD2_8W/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/AVvXsEhL8zabd8cZ3iCdAi7NkAHwzLuakOAyidg9QgHZurQCedynmMNwoJMbxHSipKKQgJnVtDED4L-nHa9WIQlQTw7M9ryqMcb2Alzk86GaFIgnH1W_tIMhhA5qO07eTb5VS6ODtCMPbWGOCDFs/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/AVvXsEhmzFDEmzwK-8vsUjb0uoO3pz158Ru1e9WC45ZmOnX37xHkZAFKhdEwkCShBXi3yc1xjkjznMPCm596D2JlgRX-hmkwfy_G4Z7ZX5q6r0xJFFwm8UAvelP1gMDesYsY53zUipeMKkByaX8i/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/AVvXsEisw6fmIC-HkNDWVA5oDYDVC8ysiNHXJqHzbZSh2x-VasKqaz0GrEiemRfUyUuosLQTKY03K-hhgFycThyphenhyphenuBqbJ1h5QPV-h7gAENTN-gLDQjQjFKPo7Mv4OyIDXFoT8Qd6G_a_T7YK6NBVr/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/AVvXsEg7le1bwZ3sFj0KAqi_dwnZuTotVwYjWyYW_iJZOo6RmzlQBMVuS2vYtJCY-7QMMM5x9jzbACLogkWpYvapIW9oBerIil_LQys9vbOXLqKdOADO9Mhb2vKTMgaypH7XdWX6FVxkwxCQrvHV/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>

Step 4. Now click on Save

google translate, blogger widgets, gadgets for blogspot
And you're done! Enjoy (:

Post a Comment

0 Comments