Saturday, April 28, 2012

Google Translate Widget with Flags For Blogger

The Google Translate Widget for Blogger allows the visitors to translate your site or blog in their own language.
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.
google translate for blogger, blogger gadgets, blogger tricks

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/AVvXsEjaiW9OtZiQbD8yiY3V7xcNZjj6OvLP36XY2xwrGYmRX0DKlfUoz84zzpjzSF_ehUI1M2PXp0ky5yorezFz503c31mnnEBmSnAvVchVpCstSVh3U1ZfJbxEvFPb2owUABcy-zgPGvaE8kps/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/AVvXsEg3hT-z134htF3wlkAbvgvrsfDLkaccI6IcpsbU94zddEdTCHAJaqLO0sA2t9JOBwOiYjQH4Swxseegz5g48ltv7kUVWxZoHubirB6-AbNnNRoZutX8AqWWYu1RMr0V23Dm5AfiGkokU18w/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/AVvXsEhWqsRjBXVvYrYedX1dxc4BikzGsDTJYwHbSlfXDqsdMGeShpC74wNI5HDgYMvv-o7byzgKsUCEX2SrjVeRInyy107x_ZRSoe53Y4IDYfzj3ezZPAsHvRMqmgH_LlueXeNWkwfQnNhboIPL/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/AVvXsEj0tO5WVt7vwnpsg1aVeAMj56_2_1rv2n-iTyOUeq0VSB1dh1DZm1t_WkNt0OmjjhrnAP5p8boMfmk8bQmo_SAH-NPdEwy_oisqhHcoxe8iTtZyoa7PuhK2TcgijHM6qAmHkdqn0nWnQ5CH/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/AVvXsEix_SHiDnmUqcYfjUjkCDDvKUK6krI1y0UsD2s_trz-GxyRHdwzBE1WAmtfMwcFG6sGR0YcJraKMqmrrzVv8nAWHrmdw3-rcIUjoUxyOst5BDyc9qB7vxIWZKZIthOvWKEJZYkqZHvCS-KO/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/AVvXsEh3WY7igTl8ulMeLoKu9RGRD3Q3Wk1Ls8Gtakh2qOdtXDmpLFsv_K9Qew3o8tBa4HVUEWUfoLlVoc-BZyHdxSVqFkCqmz4vs81m_KSruL_0Pb9ZcsSqOnSxgPHrX2zq3eAgYioUT8dphXKT/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/AVvXsEhIJC8UpfTSO0E4ht31gQA2u2ABkjMrdvGfUufqCERjk4hJu4Txv0GgwTS3g57MwBk2Oj8QkfskZKbLwa4b-NMkZNAnaRBKIfnJ23TzbujGa0qqunCXY6h5O_5Ae5wp1AhxxiFUlGhWJImT/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/AVvXsEi-cKIWxCe_UClDXW16YuI-VhfC3oUdKtKLh54OShf8PwqeK3XcYOSYsWNFHyI87qMZSe5-F-ZEgiKKOAVyhyCN5xAJ49ih1PTib_2OEL1_2GxSSFmtOy1fUn7lvxKrrpVj7QIBdrhBbuJG/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/AVvXsEj27HjU9fgcCMZDyGQFVrg_MRlriPWPO9AWmgTbaEAmd5B7a0CuTBK-iD3kjDnC_hGLu-xv0i_HAWvRzQqy5m8Nt9STONiIZh28SjuG60uDQhDxsKzltgv-z77VshwEYj9CrRf8jN2tr9EI/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/AVvXsEiebEljgJTqaeYCBXRcCg4VXDl4kBj7UYoHZmQrBl6Kyx-0FdIb75CwRos8PBp_3-u9W75Ha-X2O_ZAaoniVobBtfuVnIYF6susgbWZRjFhuAyo6-WxtKwF6jUq7tUlf8sYeYWjtUQv8sdF/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/AVvXsEiZZCDXSFXlX_zgCL7PON4frdEs6tA1Fqgu6kFWPoFKWA-oiU2i2keQ-lVWX21Vs1FUgDBWwpwFwQtT9x5NALFOcb3rOIJypYxqnS5Yiv5UvfIsY58AUcePU_g3wf9y-c2HM-_hYHug44Z9/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/AVvXsEjNB2s6jXKYO72eECFkwDfglyXPpnQYXdxJ_UIvKwjrS4iIBx1NrYKHEHPoMBcEJ58I7I_4kz5q0AeYSK576PxWTeylihC5MzFWeZKLNMr_XNlOH5TjD_yfGMfVnUTdD2Q2LSPhwvO2aGZm/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 (:


adsense

0 comments:

Post a Comment

 
 
Copyright © blog
Blogger Theme by Blogger Designed and Optimized by Tipseo