Sunday, May 13, 2007

Simple Language Transalation Gadget For Blogger

Add a HTML\Java Script Gadget and copy paste the below code.
Thanks to:Blogger-Toolkit I have added more language options to the existing code.




<img src="http://lh4.ggpht.com/_viek7Sw5RrM/Sgo5OVVY9vI/AAAAAAAAAyY/0RBg6K1wAK4/s800/China.jpg" alt="中文(简体)/Chinese Simplified" height="10" width="20" onClick="javascript:window.location='http://www.google.com/translate_c?hl=en&langpair=en%7Czh-CN&u=' + window.location.href;"></img>
<img src="http://lh6.ggpht.com/_viek7Sw5RrM/Sgo5OU1uNTI/AAAAAAAAAyc/c0aN9eojupc/s800/French.jpg" alt="Français/French" height="10" width="20" onClick="javascript:window.location='http://www.google.com/translate_c?hl=en&langpair=en%7Cfr&u=' + window.location.href;"></img>
<img src="http://lh5.ggpht.com/_viek7Sw5RrM/Sgo5OsHA3UI/AAAAAAAAAyg/u5F6_GnU-pA/s800/German.jpg" alt="Deutsch/German" height="10" width="20" onClick="javascript:window.location='http://www.google.com/translate_c?hl=en&langpair=en%7Cde&u=' + window.location.href;"></img>
<img src="http://lh5.ggpht.com/_viek7Sw5RrM/Sgo5OtIw9wI/AAAAAAAAAyk/sEn_mhXHt1I/s800/Italian.jpg" alt="Italiano/Italian" height="10" width="20" onClick="javascript:window.location='http://www.google.com/translate_c?hl=en&langpair=en%7Cit&u=' + window.location.href;"></img>
<img src="http://lh4.ggpht.com/_viek7Sw5RrM/Sgo5Ug9TI9I/AAAAAAAAAyw/UzPdLH8Oczc/s800/Portugal.jpg" alt="Português/Portuguese" height="10" width="20" onClick="javascript:window.location='http://www.google.com/translate_c?hl=en&langpair=en%7Cpt&u=' + window.location.href;"></img>
<img src="http://lh4.ggpht.com/_viek7Sw5RrM/Sgo5UiRz63I/AAAAAAAAAy0/pQUrNz_Grlw/s800/Spanish.jpg" alt="Español/Spanish" height="10" width="20" onClick="javascript:window.location='http://www.google.com/translate_c?hl=en&langpair=en%7Ces&u=' + window.location.href;"></img>
<img src="http://lh6.ggpht.com/_viek7Sw5RrM/Sgo5O8U4boI/AAAAAAAAAyo/drltyjz7w6Y/s800/Japan.jpg" alt="日本語/Japanese" height="10" width="20" onClick="javascript:window.location='http://www.google.com/translate_c?hl=en&langpair=en%7Cja&u=' + window.location.href;"></img>
<img src="http://lh4.ggpht.com/_viek7Sw5RrM/Sgo5UX_45YI/AAAAAAAAAys/Z-eY95VTn_U/s800/Korea.jpg" alt="한국어/Korean" height="10" width="20" onClick="javascript:window.location='http://www.google.com/translate_c?hl=en&langpair=en%7Cko&u=' + window.location.href;"></img>
<form action="http://www.google.com/translate" onsubmit="this.u.value=window.location.href" method="GET">
<input value="en" name="hl" type="hidden"/>
<input value="UTF8" name="ie" type="hidden"/>
<input value="" name="u" type="hidden"/>
Select Language: <select name="langpair">
<option value="en|de">deutsch</option>
<option value="en|pt">português</option>
<option value="en|fr">français</option>
<option value="en|ja">日本語</option>
<option value="en|ar">عَرَبيْ</option>
<option value="en|it">italiano</option>
<option value="en|ru">pусский</option>
<option value="en|po">polski</option>
<option value="en|zh-CN">中文</option>
<option value="en|es">español</option>
<option value="en|ko">Korean</option>
<option value="en|nl">nederlands</option>
<option value="en|hi">हिन्दी </option>
<option value="en|el">Ελληνική</option>
<option value="en|ro">română</option>
<option value='en|bg'>Bulgarian</option>
<option value='en|ca'>català</option>
<option value='en|zh-TW'>Chinese (Tradtional)</option>
<option value='en|hr'>Croatian</option>
<option value='en|cs'>Czech</option>
<option value='en|da'>Danish</option>
<option value='en|tl'>Filipino</option>
<option value='en|fi'>Finnish</option>
<option value='en|iw'>Hebrew</option>
<option value='en|id'>Indonesian</option>
<option value='en|lv'>Latvian</option>
<option value='en|lt'>Lithuanian</option>
<option value='en|no'>Norwegian</option>
<option value='en|pl'>Polish</option>
<option value='en|ro'>Romanian</option>
<option value='en|sr'>Serbian</option>
<option value='en|sk'>Slovak</option>
<option value='en|sl'>Slovenian</option>
<option value='en|sv'>Swedish</option>
<option value='en|uk'>Ukrainian</option>
<option value='en|vi'>Vietnamese</option>
</select><br/>
<input value="Translate" type="submit"/>
</form>



The Output will look like the "Translate This page" on the right hand column of my blog.

Hope this helps.