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/AVvXsEiifVp9VNqKbVhFybvr-xsm1nxf0KkYdyyAIUF_hUgEnQJ68sl9jn290DdZENbIyP_6AK73ybq-crPAapNI1_t65Lha_vCnPMDfidNz9jHOm3-NJXrWdhZIe2GLa77jyPbHob6BOccLqAWU/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/AVvXsEhWlBXv6ZeQ3lkrnvkpAlFgcEXLDyHKcxxZXjo5xVjweEpUZSGVYo-KPhzIbZrhuwSrthosFpKTM6x-8nEBuu2jsP5iSYS_juH4E23OT8fNGuADFDO9Uzko6fIUnrI7NrM4fM-wN4M6yrEF/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/AVvXsEjNOh_SOHs6nqqHHAvIXd-PKiDqMR1UK-A3G0sUJ8mB2s__FM6KqbrPwIUs0e7S9_vpsncZhkwg6-onwZf3sP0dqRvByUdWWMPZN7rx1ZvCWWuHV5C8xXcbAcPW_1PLu0vmVRDGg-xg46Sm/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/AVvXsEhzIxs-HmZJY8cK8yzBevdGBISTJ5QAutGs_hSdxfaKRJXykrmb1F_k6v5aRWiyGg1ZaNacCMk1yE4f7s_cuzLyYr4BUwb-ZTfZWJVv9g463zedxoAPHW0vC2mWFJoSgozTambg9CL16LpJ/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/AVvXsEjNd17L7wAv8_lE7VoSCZ7lClAzCgyU7Zw1-CcLzHfM4aNhLbbkdDN-49UV0osMxr3v8LVxzG_L_lHvnHUifT16O77m0VE4_TErGJqVN0nRg4b77yFJSGi2Y2w-wjR7dsEvBQR8XoukBIO7/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/AVvXsEgSR7VBOA391g52aT191JoU5Nw2fEyjrr4QmTW2wn9g4b-QTDQS9hQV1erNwpHoFrIHel4CSvZksoXE2uXCQKM3CJjAUo3yNXitGIXtJ1mYu9hGbqocIHMQG_Tywt0Yu-MNGMasp11ZHOF4/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/AVvXsEgvUyvT57b46vwLW9xHYI9d9jj4KjUBhq5mMpvgG81lwzR1CB9KKejCK9SdqgovR1xafAarU32KFjC6k6ANoMC3M-B9tgehlv4R7fI1CQk7tdlPLuCqzF-o1jhYzR90ebxyLhmzLTJ7zKJm/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/AVvXsEhaDRL_v2KwiYjrUj-Tymx9yZfCqw1IHyhCu3-w8uLak5aP67x39jPuKU9md2lp35Yq7I8BMAN9fvQ3Ge0c4IEyQQS3hjhIPeUHNkqGt2uYnVkZLr3EFIXC9oPf1YpF5UloD0-oCDzdhgNq/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/AVvXsEj0pAI9h0ruZb1y-DNPHMpszIH7dNjScwiiuIFctt8ZiF32UEPns1vOmFDoU8YnZemvvd4z7eUokAxfXXs4pOtVMTuLJt6CjcrrXZkrnAqpAFRGD5xe-wYZ4GTkgyV34jj8KMW8IApvPn1e/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/AVvXsEgC4sp9sjmEQLbEwI9qdaL7MPfmk77Kdt3fO85O4VwB2mx5vIemaemm718wUHsLwgSDgwCZXDAxFZdmbhNYKtTvt0bs6tA5tjZFfscWXNfkH1xkbRaUpVof1h-s_a_6vcVfp0-lFBvy4pIF/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/AVvXsEh0IJoaOeo6fnYUdyp286FdHulo_b9PtH7YUgWHoAfbW_og-JqQE1dC7L4ay6W3Qv-QUjliSVYrFqwxkgMfOjzRV7imCTf6390vPbwpT6LghSdi9PU01kZtP48J_-iZDrtILtyBvAOm8b6E/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/AVvXsEgkTtlApbiRwYUvGRpHVg4DkUAnPklU6DAZJxYQOkT-wPsXkwVaUouj0mQRMU2Nr-o39Z8UHwA12RGIu51crTovA5XK97k_IpPFGB4JLb9odZdk3DGTqdwxSzXPIuhj3QXUD5BI65c3lOtj/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
 
 
Copyright © blog
Blogger Theme by Blogger Designed and Optimized by Tipseo