Google Translate WordPress — Translator Widget

Using Google Translate WordPress with simple Translator Widget Code Tutorial.

Some days ago, i have wrote about using multilingual wordpress plugin, including the alternative ways that you can achieve to have your blog or website to be accessable by different people with their own different native languages.

In this post, i want to point out more about Google Translate WordPress without using any plugins.

Google Translate WordPress Demo.

In my sidebar, below the “today’s date” i have a widget that shows my visitors they can change the language of this page, that’s my Google Translate WordPress widget.

See image (if i don’t remove it).

google translate wordpress

My Google Translate WordPress look.

How to add this Google Translate WordPress widget to wordpress blog?

It is very easy, this is why i don’t make any video tutorials on this :)

Steps:

1. Add this line of code in Text widget (see more infos in my post about how to use widgets in wordpress 3.0.1 tutorial :)

<script type="text/javascript" src="http://www.gmodules.com/ig/ifr?url=http://www.google.com/ig/modules/translatemypage.xml&amp;up_source_language=en&amp;w=160&amp;h=60&amp;title=&amp;border=&amp;output=js"></script>

Don’t forget to click “save button”.

2. Refresh your blog, you should see, Google Translate WordPress widget in your sidebar, with the text “gadgets powered by Google”. (see image below).

google translate wordpress

There is text, gadgets powered by Google.

Notice i have this text gone in my widget. If you want to have the text, then this tutorial is done for you.

But if you want to hide the text, because for my blog, the text was long for my sidebar, so i did hide it with css.

If you need to hide it, use this code to paste in the bottom of your stylesheet file (style.css):

.gadget tr td img, span.powered{display:none;}

Downside using this code is another javascript is involved in your site, means when you measure the loading speed of your blog with pagespeed firefox addon, it will show that we should combine javascripts.

The advantage, we are successfully reducing plugins usages with this Google Translate WordPress widget code.

Share the knowledge
Share on Google+0Tweet about this on Twitter1Share on Facebook0Pin on Pinterest0Share on Reddit0Email this to someonePrint this page

Comments

  1. Rahul @ MazaKaro says

    Thanks again, Kimi! you always make things easy for us that no question left. Just one thing I’ll say, I must follow it.

    Cheers.

Trackbacks