How to Add the Language Translator Buttons?

>> Browse templatesMoney tips4 comments

Here's the code you can add to create the flag buttons (above) to translate your blog into different languages, depending on which country flag the visitors click. Simply copy all the code below and paste them into a widget (aka a Page Element) and all the 9 flag buttons will appear.


<form action="http://www.google.com/translate">
<script language="JavaScript">
<!--
document.write ("<input name=u value="+location.href+" type=hidden>")
// -->
</script>
<input value="en" name="hl" type="hidden"/>
<input value="UTF8" name="ie" type="hidden"/>
<input value="" name="langpair" type="hidden"/>

<input onclick="this.form.langpair.value=this.value" title="French" value="en|fr" type="image" height="20" src="http://photos1.blogger.com/img/43/1633/320/13539949_e76af75976.jpg" width="30" name="langpair"/>

<input onclick="this.form.langpair.value=this.value" title="German" value="en|de" type="image" height="20" src="http://photos1.blogger.com/img/43/1633/320/13539933_041ca1eda2.jpg" width="30" name="langpair"/>

<input onclick="this.form.langpair.value=this.value" title="Italian" value="en|it" type="image" height="20" src="http://photos1.blogger.com/img/43/1633/320/13539953_0384ccecf9.jpg" width="30" name="langpair"/>

<input onclick="this.form.langpair.value=this.value" title="Portuguese" value="en|pt" type="image" height="20" src="http://photos1.blogger.com/img/43/1633/320/13539966_0d09b410b5.jpg" width="30" name="langpair"/>

<input onclick="this.form.langpair.value=this.value" title="Spanish" value="en|es" type="image" height="20" src="http://photos1.blogger.com/img/43/1633/320/13539946_2fabed0dbf.jpg" width="30" name="langpair"/>

<input onclick="this.form.langpair.value=this.value" title="Japanese" value="en|ja" type="image" height="20" src="http://photos1.blogger.com/img/43/1633/320/13539955_925e6683c8.jpg" width="30" name="langpair"/>

<input onclick="this.form.langpair.value=this.value" title="Korean" value="en|ko" type="image" height="20" src="http://photos1.blogger.com/img/43/1633/320/13539958_3c3b482c95.jpg" width="30" name="langpair"/>

<input onclick="this.form.langpair.value=this.value" title="Chinese Simplified" value="en|zh-CN" type="image" height="20" src="http://photos1.blogger.com/img/43/1633/320/14324441_5ca5ce3423.jpg" width="30" name="langpair"/>

<input onclick="this.form.langpair.value=this.value" title="Arabic" value="en|ar" type="image" height="20" src="http://farm4.static.flickr.com/3043/2347434064_0d36a04624_o.gif" width="30" name="langpair2"/>

4 comments:

Phillip January 05, 2009 1:43 PM  

Can you tell me how you place this in the linkbar (like you have on your site)?

The residents January 12, 2009 6:27 AM  

Can you tell me how to create the Dutch translator button? I can not find a code such as:
input onclick="this.form.langpair.value=this.value" title="Dutch" value="en|nl" type="image" height="20" src="http://photos1.blogger.com/img/43/1633/320/????.jpg" width="30" name="langpair"/

Zuzeeko T. Abeng October 09, 2009 9:42 AM  

Thank you very much for sharing.
www.zuzeeko.blogspot.com

TechGeeze March 10, 2010 2:44 AM  

I made a friendly tutorial about on how to install Google translator for your blogs or website, anyways I thought it would help and drop here to share it, you may go to this link: How to add Google Translate Button on your Blog