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

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/AVvXsEjJjGftwB8nQr9Jtw5CPSXktW7rnniAWmU3l5AnsEshL5Ec8qBgjlq5hNcyQLi03726DkvJAz1Zxtc85PTyYKJnpR9rf-Cn7L6WLx-3-Z_sG3cwSSnZiBfEzA2_1pkovA0GnWY0PXsTsUCL/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/AVvXsEggWlcILuJKC6Pm-w9kY2cpmnSNeBdsNUyGDtG3SpcTiKKenxY04rYDkxQ7Ju4TkHTMZo07MaP5yne31dbW5LETWPV44ZWmJJz-o5sqdBhBYWx91YAGAULwKesho9xnGA3v1aYdLWShI7S9/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/AVvXsEiIAgtlarxo9KIhynw1oq3oRWaOrKR07GXv3mL8ITuHbZH5XxshSp23m_fxfBQF4OgvorV-p-K3dXgoeb6kOzoqSVawxM1EemlMZZj1mYEcvAnNl_m1Ay5AoCsC2BCDavqcQW8WNPl9xckG/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/AVvXsEgyMjTMM6L8LRDZOQi41JhSgdexp26maNx2Y3nMwtilk2R-3Saj0XHxjapjLGwNFjErlw5dQl9TXKk7Llx7SOK8mfnKYbHbNYQFwLWMP2q17m9x0yiH-TV1yBEAzZLVqV74SaiiTy_07cIw/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/AVvXsEho6mjaUyMF4GblJzJlFMtPoPF7fhI9veo0sBN1neaJxGHMfExTgGqMRbVwHJaGEztRqfVS5vcQSD0HXJB5SkKOl35H2ZqAAf1YOPpaJitgC-v1DjZ2GphPkyn0_hVd7KuPX4CzttZ015-e/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/AVvXsEhxgGW-b6IBSB1IbyFdMIgBdt56swgmqFg79TkXsZmTLy-FvaH-r_k4oTr7nfbMs_hshssJP1JlmyEiSyEhwfvY2ngjLJocFUyLrUpciZbPOZvgAJxluSGOg_ZtAzAvOQ4CfXQbsWVSb5J5/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/AVvXsEgIY6SmFMp275FkeGjX606B8HrkEFF7TXE0m_jew_9ojJdHpILpK9z3j24ooDpvGRIeGpebKnq7XOriDcNYd1cSYwqW5VfQIZCsYdSYVidJp-jJkNqnGD7RN57pFtFgbJJg3tYUfBBG5d-x/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/AVvXsEi6tPZ_lhiVR7MGZ1FzD8_Mn_PoBlD8JOCd18K4GhtXnl6XirTePMyw1GcLZZPXlTMDV20qyMRhOp21q4eEdowzEVW7MjAhqynolMYv0pVaJCST-UwrjyyBxQcAmOc3pDsVn7yA-gOfi5-o/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/AVvXsEgmEXiHfsxj9bQKJGEXGMO7IjT36YPBKGQjmpJQNaoX5W4IsjNWqvnO-hu_MN0yj4-D0k2YD2zKwJDWDbYEWhklsLjmfNZZswjkGF8fPzkiGUS3bdPfDnZFMklS3rIxWRRnD-jM1c8iCYKs/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/AVvXsEi98orEGhWq81zaPYkFl5ZGbQJFftGCvnUCYmg26aRK08ek9EPzqmQvIRs01FWO9EGCAtpB60jE9STMf3Z-IpthT2D4zcCeGb29Bk0mpX_jMF_AabBk_wQ2C1txc5wgpbFnrlHkBglaNM8r/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/AVvXsEiSVpi0E4Hd2V7RAvS9KWqHwR94wJgdxVcvt6Anmi05tlyFCIE3FJW9malUIK-34sLcQ0b1oPM13veOz0oUZAUNQpjNorjTvz7gbHBc9WV0sx4l_gEw4XWoesXMCqm19DcdONpmh1N8SfTm/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/AVvXsEiVVnLVIN_GiSEpux6sx-bDLWMNFTq7gb66ScO2qWMMo3rektN6mXAc18-jEVXPZNm4qvtWEMCcGDiDmZY5fn17UJo05oFcetregH6b1rr4guS48IrxOzpaiT9x5u0wm5fN_xxB6JXsauQX/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

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

No comments:

Post a Comment

Search This Blog

Recent Post

Recent Posts Widget

Blog Archive

Popular Posts