Skip to main content

Right Google Translation Widget for your Website

Google Translation Widgets are available in four different flavors – as a JavaScript based Language drop-down, as a overlay toolbar, as AJAX for in-place translation and as plain HTML. This article discusses the pros and cons of each option to help you pick the right translator button for your website.
google translate If you looking to add language translation functionality into your website so that non-English speaking visitors can read your pages in their native language, you have a couple of good options to choose from.
Google Translate, Yahoo’s Babel Fish and Microsoft Translator (Bing) provide ready-made translator widgets that you can integrate in the body of your site using simple copy-paste. We’ll however focus our attention on Google Translation only since the other good choice, Microsoft Translator widget, is not public yet. Babel Fish has been around for ages but we’ll skip that widget as well since it supports only a limited number of language pairs.
Before we discuss the various options for integrating Google Translation into a site, you should check this online demo page and play around with each of the examples to understand how they’ll look and function on your site.
translation demo

Google Gadget for Translation

google translate gadgetGoogle Gadgets – This a JavaScript based widget that supports all languages and is easy to implement but the problem is:
  • All the language choices are displayed in one giant drop-down menu and there’s no way to remove some options from the list (unless you create a new gadget by changing the XML file manually).
  • The Google Gadget will open the translated page in a new window and visitors will therefore have leave your page after translation.

HTML Widget with Language Flags

google language flagsWhile using country flags may not always be the best option to represent languages (as some countries – like India – can have multiple languages and some languages – like English – are spoken in multiple countries), if you still prefer to have flags in your Google Translate widget, here’s the code.
These are simple HTML tags so you can add /remove languages or completely modify the look of the widget using CSS styles. You can also replace the graphic images with text and this may be a good option for sites /blogging platforms that don’t allow JavaScript code.

Google AJAX Translation with Cookies

google jquery translationWith the AJAX Language API, your visitors can perform inline translations without leaving the page or even reloading it.
The other advantage with AJAX based translation is that it will not rewrite the internal links on your web pages after translation. This is helpful because if someone decides to bookmark or share a translated version of your page, they’ll still be using your original URLs and not that of the Google Translate website (in case you haven’t noticed, when you translate a page with Google Translate, it changes all the links on that page by default –
Advanced users may incorporate the jQuery Translation plugin into their site. This plugin uses cookies to remember the language preference of a visitor. For instance, if a visitor decides to translate your site from English into French, the cookie will remember this choice and the visitor will automatically see all the pages in French the next time he or she visits your site.

Google Translate Bar with Auto-Detection

Google has released a new widget (they forgot to give it a name so we’ll refer to it as the Google Translate Bar) that not just looks great but allows inline translation as well.
google translate bar
Why you’ll love the Google Translate Bar
1. It appears only when required – The bar can auto-detect the language of the visitor’s browser and if this is found to be different from the language of your page, it will show up automatically on your page.
2. It wont alter links – Like the jQuery plugin discussed above, the Google Translate Bar too won’t modify any of that links on your page which is great if people decide to share your translated pages.
3. Pick few languages – Google Translate now supports 50+ languages but there’s little point in adding so many languages to you language drop-down menu. You can use Google Analytics (choose Visitors -> Languages) to determine the top 20 languages that your visitors have configured on their computers.
Just add these languages to your Google Translator widget and ignore the rest. I have used a similar technique for the translator on my site (see the globe icon near the site’s logo).
Why you may not love the Google Translate Bar
The downside is that the new Google Translate bar requires the Flash player so if someone is viewing your site on an iPhone or a browser that doesn’t support Flash, they’ll still see a link to translate that page but it won’t work as expected.
The other issue with Google Translate Bar is the design – it’s beautiful but they have definitely not optimized for small screens like that of netbooks.

Conclusion: Google AJAX API or Google Translate Bar

While implementing Google Translate Bar is easy, the AJAX API solution gives you more control. For instance, you can translate pages without showing that big overlay bar and second, you can prevent certain areas of your site from getting translated (like the navigation bar or the footer).
You can auto-detect the browser language of a visitor using either of these methods.

Comments

Popular posts from this blog

Email On Deck: A disposable email address that works

Today, Team Inforpioneer brings an interesting Email service for our reader which will definitely help our readers to improve their internet security and will benefit in some other ways.  Here is a short description of this service.  EmailOnDeck.com is the premier site for all things relating to temporary, disposable and throwaway email addresses. We want to help you avoid SPAM, protect your online privacy, and stop you from having to give away your personal email address to every company and person on the internet who insists on you giving it to them. We work hard and will continue to work hard to give you a disposable email address that works with any site or app. We hope to help give you back the control of deciding who you want to give your personal info to. Temporary emails are perfect for any transaction where you want to improve your online privacy. Use them when you buy or sell Bitcoins or trade cryptocurrency, at exchanges, or locally. They can be used for QA tes...

SEO Optimizing A Website For Improved Value

SEO or search engine optimization is something that every web owner and creator should be aware of. Even if a website owner hires an expert to carry out the online marketing, understanding the very basics and how it really can improve a websites performance and popularity is important. Simply put, optimizing a website is important and is built around keywords that are valuable to a website and to the products or services it is trying to provide. By focusing on main keywords or key phrases for a business, and expanding on them over time, can improve the amount of visitors a website receives, in turn increasing profits or simply improving its popularity if it is an information website. SEO is valuable, and means a way of making a site appear at a higher ranking in search engines such as Google, Yahoo, AOL etc. Using this important type of online marketing can reap great benefits. It takes time to learn and time to complete, and is a constant job to keep a website performing well above co...

Dr. Elmi Zulkarnain Osman. The Award Winning Trainer With The Right Humour.

Dr. Elmi Zulkarnain Osman – an award-winning educator, a popular corporate trainer and a highly paid Malay English Language Coach started his career as a teacher in a government school in Singapore before becoming a lecturer in a government-based institute. Throughout his career with the Singapore Public Service, Dr. Elmi has already been acknowledged as an accomplished public speaker and a motivational speaker known for his high energy delivery and humorous approach. He is also well known in the grassroots circle as an experienced Chief Facilitator and an accomplished Forum Moderator. Upon completing his PhD in Educational Leadership with Trident University International in 2018, he and a few like-minded friends decided to set up Elemantra Training Consultancy. A consultancy that has been delivering their promise to deliver an “enriching experience every time”. As the CEO and Principal Trainer at Elemantra Consultancy, Dr. Elmi is very much known for his exceptional communication ...