How to add my language translator into Google Language Translator Gadget (JavaScript)
>> Thursday, January 14, 2010
In previous posts we've discussed How to install Google Language Translator. In this post, we will discuss How to add a language translator into Google Language Translator.
To add a translation into another language (other than those already there), First we should have a country flag icon in accordance with the laguage to be added..So that our blog visitors can easily choose according to the desired language.
You can easily find the flag icon in internet and download it, just enter the keyword "download icon flag" into Google search box and you'll find so many sites that provide free flag icons.
After finish downloading, you should keep it on the server which can be accessed later. There are so many sites offering free hosting for storing our files, You can learn about it in Using Google Groups and Google Sites as web storage.
The next step, we will learn a Google Language Translation JavaScript Codes. Well, please look at the JavaScript below that I copy from " How to install Google Language Translator." the last paragraph before </form>
<input onclick="this.form.langpair.value=this.value" title="Español/Spanish" value="en|es" type="image" height="20" src="http://photos1.blogger.com/x/blogger2/6075/564571464515337/1600/z/998398/gse_multipart12407.png" width="30" name="langpair"/>
Español/Spanish ..... This title will apear when we put our mouse cursor above the Flag Icon.
en|es ..... This script is meant to translate command from English to Espanol /Spanish (country code)
20 ..... Height of the Flag Icon
30 ..... Weight of the Flag Icon.
http://photos1.blogger.com/x/blogger2/6075/564571464515337/1600/z/998398/gse_multipart12407.png ..... Flag Icon Image address
So if you want to add a new translater into Google Language Translator (Indonesia for Example):
1. Log in to Blogger .
2. On your Dashboard, select the Layout menu, and click the Page Element.
3. Click Edit link your Google Language Translator Gadget.
4. Copy the last paragraph of your JavaScipt before </form> and paste right after it.
5. Replace Español/Spanish with Indonesian/Indonesia, en|es with en|id and http://photos1.blogger.com/x/blogger2/6075/564571464515337/1600/z/998398/gse_multipart12407.png with Indonesian's flag icon image address that we've stored before. In this case I change the image addres with http://sites.google.com/site/blogforstorage/blog-for-us-f/id.png
6. If you feel your image flags are to small or to large, you can set it by changing the value of 20 and 30.
7. Don't forget to Save it...
You can find / get the "(english) country code" and "icon flags" of all countries in the world in http://doit2us.blogspot.com/2010/01/lists-of-english-country-names-and-code.html




