Saturday, December 27, 2008

Add Language Translator/ Flags Images Widget To BlogSpot Blog

If you are having a blog and receiving visitors from various countries and cities of the world, then they may or may not be comfortable with the language of your blog. So adding a translator button or a widget is always useful.
If you do not know the location of visitors coming to your blog, then you should first read my post on track your blog's visitors.

You have two options to add a translator:
1. By this method, you will get a compact translator, with a drop-down menu. And the method is really simple too.
You can see this translator in action in the sidebar of this blog.

To add a widget/gadget do this:
Log in to Blogger
Go to Layout and then Add a Gadget -> HTML/Javascript
Now copy and paste this code in to it:

<div id="google_translate_element"></div><script>
function googleTranslateElementInit() {
new google.translate.TranslateElement({
pageLanguage: 'en'
}, 'google_translate_element');
}
</script><script src="http://translate.google.com/translate_a/element.js?cb=googleTranslateElementInit"></script>

*source - Google

Although by this method you will get a compact translator widget, but if you do not want to show the link to Google, and rather you would like to show some flags of different countries, like this one:




| | | | | | |

| | | | | |

| | | | | | |

| | | | | | |

| | | | | |


To get these flags translator buttons, you have "Add a new Gadget" -> HTML/Javascript
then copy and paste the code from this page: Website Translator Flags Code

NOTE: In that code, you have type your Blog's Address in the appropriate places [In the 8th and 9th Lines]

No comments:

Post a Comment

Related Posts Plugin for WordPress, Blogger...