Do I Speak Your Language?

by Lee Turner on 19/05/10
in How To

I have to say up front that my skill with languages is very poor. It is something I have struggled with since I was at school when I sat in my French exam blankly staring at the examiner who was expecting me to impress him with some fluent expression of how nice the weather was (or something like that - I have blanked most of it out of my mind). However, one thing that I am pretty good at is testing and tracking different things on my sites.

If you have any kind of analytics package installed on your b2evolution blog, you will probably have more data than you know what to do with about how many visitors come to your site, how long they stay and the pages they visit etc. One of the things that interests me is looking at where the visitors to my site are coming from and Google Analytics has a very nice map overlay allowing you to pinpoint geographically where your visitors access your website from. You can also click on the map and drill down even further to individual cities and towns which is great if you are looking to target specific regions with any of your SEO effort.

Follow up:

Here is the Map Overlay for this site:

Google Analytics Map Overlay

As you can see from the map, the visitors to my site come from all over the world (57 countries to be exact). As this site is written totally in English I had to ask myself whether the people visiting were able to consume the content in any kind of meaningful way. Looking into this a little further, I can see that the top two countries hitting this site are the USA and the UK, which are both English speaking countries. So at least I know a high percentage will be able to read the content on this site. However, I want there to be as few barriers as possible to people getting the most out of this blog as possible. The solution to this turns out to be very easy.

Enter Google Translate Tools

Using Google’s Translate Tools you can simply add a little snippet of code to your site to add Google’s website translator to your web pages giving your visitors the ability to instantly translate your content into their chosen language. I added this to the sidebar of my site by simply adding a Free HTML Widget to my sidebar and entered the following code:

Code:

<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>

This code specifies that my website content is in English so if your content is in a different language head on over to the Google’s Translate Tools page and generate the code for your language.

Lee Turner's Signature