Translation WordPress Plugin Using Google Translate

I thought of writing a plugin after reading the post by Amit regarding a hack to Translation using Google AJAX Api. This plugin is using the Google Translation PHP class to do the translation. You can check it yourself by clicking on the language link above.

I have released a stable version 1.3 which is working fine with PHP 5. There are some issues with PHP 4. I am working on that and hopefully I will be able to release a version working with PHP 4.

This plugin is working excellent for me and I have got some feedback from some other users who have downloaded this plugin and are using it.

What does this plugin do?

image

As you know that there and different languages used on the world wide web and you get visitors from different country. If you are able to offer the translation in different languages, it will be of real use to your visitors. Translating all your pages to more than 20 International languages manually are practically impossible for a blogger or any individual. There are translation engines which provide this service and I have used the Google Translation API in this plugin.

Even though these engines do the translation work, the translation received needs to formatted properly to display the output as the same as the original ones. I have worked a lot on this and tried to put up the translation results the best way it can. I know that there are some issues, but its acceptable.

This plugin does the following

image

  • You can translate more than 20 International languages.
  • The translation can be done by the visitor using an option selection or just clicking the languages link.
  • AJAX is used, so the translation is provided instantly without the page reload.
  • Every language has a permanent page and the page is stored in the database for future use. If you have made some changes to your post, you can clear the caches and get the new translation done
  • As all the translated pages has a Permanent link, your pages are indexed by the search engines.

Installation

Installation is very simple, just upload the unzipped files to the plugins directory and activate the plugin.

To create pages for each language, you need to modify the single.php file as given below

To generate titles in the translated language, you need to modify the header.php file as given below

Settings

After activating the plugin, just go to the setting link , you will find the Kish Translate settings link Once you go

to the settings, you will find all the options to customize the view of the “Kish Translate” Widget and select the

languages

I need your feedback to improve this plugin, so please post your comments here

You can download Translation Plugin for WordPress Here

Lechu is a part time blogger, full time home maker, interested in cooking and teacher by Profession. She works as a chief editor of this blog, helping in publishing Guest Posts as well as writing on topics of her interests.

72 Comments

  1. WordPress Plugins: Translation at WordPress Today

    [...] ??Translation???Google Translate???????? ??????Google Translate????????????????Google AJAX Api???????????????????????????? [...]

    Reply

  2. Páginas » Blog Archive » Plugins

    [...] have been Flickr Photo Album, Kish Translate, and WordPress.com [...]

    Reply

  3. Dumu

    Nice lpugin,but it is strange that there were no English option.

    Reply

  4. Dumu

    I suggest that an increase in the local language options, which can be in different languages on the Web site to be used.

    Reply

  5. Avinash

    Kish, thats a gr8 plugin but for me its not working on translating its showing me nothing on translation.

    You can check it out at my site.

    Reply

  6. Kishore

    @Damu, I have english, I will be adding new languages in next version which will be released soon
    @Avinash, I think its a problem with the server path, can you please download the latest version and update the funtions.php file. I have added a patch for this issue.

    Reply

  7. Avinash

    Kishore, Its still the same, any download link from your server

    Reply

  8. Inline Translation Using Google Translate In Wordpress | BloggingBandit

    [...] Translate : HomePage || [...]

    Reply

  9. Translate your web pages and get Google Indexed

    [...] Original    I have written a WordPress Plugin for Translation which has the advantage of translation pages in 20 languages and you get Google to index these [...]

    Reply

  10. baron

    hi. Thanks for plugin

    perfect.

    Regards

    Reply

  11. Avinash

    @ Kishore : Ive tried the 1.3 version and iam getting this error,

    Fatal error: Call to undefined function: json_decode() in /home/public_html/bloggingbandit/wp-content/plugins/kish-translate-ajax/googleTranslateTool.class.php on line 144

    You can check it out on my site !!
    And Iam also not sure why Iam not getting the lang in the link, on mouse over the langauge rather it is pointing to ##

    Reply

  12. Kishore

    Avinash – thats because of the PHP Version json_decode() is in PHP 5. I guess you are using PHP 4, I have a patch for this, but I have not tested it as I have my servers with PHP 5.2. Please download this and overwrite the exisisting files
    http://kish.in/wp-content/downloads/kish-translate-ajax.zip

    Reply

  13. Amit

    Excellent plugin, Great job

    Reply

  14. Avinash

    Its not translating but giving an option clear cache, clear cache all

    on clear cache it says Error clearing cache..DELETE FROM wp_kish_translate WHERE pageid = 85 AND langid = ‘fr’ LIMIT 1

    on clear cache all, it says error cleaning cache,

    check if needed

    Reply

  15. Kishore

    Avinash, I am unable to Debug as I do not have PHP 4. Its works perfectly with the latest version of PHP.

    Reply

  16. Avinash

    Its ok Kishore, thanks for your efforts.My hosting is still on php 4.2.4, so shall try the plugin later.

    Reply

  17. rivermaya

    Hi,
    is it can overload the hosting space ?

    Reply

  18. Kishore

    @rivermaya – No, there are no chances of overloading the hosting space. The file are very small

    Reply

  19. rivermaya

    I thought because it will generate many languages for each post it will overloading hosting space ..

    this is great plugin, thanks Kishore ..

    Reply

  20. Kishore

    @rivermaya – it creates pages in the DB and you have an option to clear the cached pages if you feel that your DB size is increasing. I am using this plugin for posts about 1000 and its not giving any trouble

    Reply

  21. Kevin W.

    good article, very useful.

    Reply

  22. Leon

    Hi Kish,

    I love the idea and i installed the plugin.
    Unfortunately it shows blank after translation.

    You can check my site using the link above

    Reply

  23. Kishore

    Leon – which version of php are you using? Does your server has curl library enabled?

    Reply

  24. Leon

    Hi Kishore,

    I have on the (CentOs) system:
    /usr/lib/libcurl.so.3
    php.i386 5.1.6-15.el5 installed

    from php info:
    CURL support enabled
    CURL Information libcurl/7.15.5 OpenSSL/0.9.8b zlib/1.2.3 libidn/0.6.5

    Installing curl-devel and a restart of the httpd didn’t help

    Regards

    Leon

    Reply

  25. Kishore

    Leon – need to check, it should work for sure.

    Reply

  26. dumu

    Thanks Kishore, Great job.

    Reply

  27. Tajger

    Nice plugin, using it on one of my sites!
    However, on the second of my sites it does not work.

    Getting this error when trying your plugin:
    Warning: curl_setopt() [function.curl-setopt]: Unable to access cookie in ../wp-content/plugins/kish-translate-ajax/googleTranslateTool.class.php on line 182

    Running PHP 4.4.4.

    Got any ideas?

    Reply

  28. Kishore

    -Tajger – I am sorry, I have not tested in php 4.4, and you need the curl library enabled on your server, you can ask your hosting company to do this.

    Reply

  29. rivermaya

    Hi Kishore, it’s me again :)
    I just found that the translated always repeat the original title without translating it. I tried remove few codes within but nothing change.

    and why the border for drop down country in that site is different (too long) than I installed on other site ?

    kindly look at my site, please ..
    thank you

    Reply

  30. Kishore

    -rivermaya, I think its because of the template, can you try setting the width of the option box in the funtions.php file
    .optionlang {
    font:Verdana, Arial, Helvetica, sans-serif;
    font-size:12px;
    width:30px; /*Add this line */
    }

    Reply

  31. rivermaya

    thank you for the width code, it’s work :)

    I’m still figuring out about the repeated title within the template code, at least not too big

    Reply

  32. Kishore

    -rivermaya, you can change that by editing the h1 tag. Its in line number 530, 540 and 544 of the functions.php file. You can change to either or what every your like or suits your page

    Reply

  33. rivermaya

    great, all things fine now

    thanks for the support ;)

    Reply

  34. Some Wordpress Plugins You may like to use

    [...] and you get international readers from search engines. You can find more information of the WordPress Translation Plugin at my blog and you can download it from the WordPress Plugins [...]

    Reply

    • Miha

      Thanks for the information. It’s very useful for me.

      Reply

  35. techshore

    Could u please arrange widget for wordpress.com

    Reply

  36. K. Pinckney

    I keep getting this error:

    Fatal error: Call to undefined function: register_sidebar_widget() in /home/sites/sitename.com/public_html/wp-content/plugins/kish-translate-ajax/functions.php on line 693

    Reply

  37. Kishore

    Pinkey – Which version of wordpress are you using? Is your theme widget enabled

    Reply

  38. K. Pinckney

    I am using 2.1.1

    Reply

  39. Kishore

    I have tested only on 2.3

    Reply

  40. gh3

    Nice job very useful plugin.
    Now is not working on my blog was Ok in WP 2.6.2 but in WP 2.6.3 is taking very log time to work o text with no result, i will try to see where is the problem.

    Reply

  41. Rajesh Narayanan

    Nice plugin; but doesn’t seem 2 go so well when original language is indic like say tamil!

    But otherwise very neat… Thanks!

    Reply

  42. Agam

    I hope this plugin can translate comments too.
    Thanks a lot for this wonderfull plugin.

    Reply

  43. CanI Clean It

    Thanks, this is one of the better posts I’ve read today. I share your vision about that. Thanks man!

    Reply

  44. Rajesh Narayanan

    Hi,
    The plugin used to work sometime back; now I get a clear cache on
    trying to convert and when I click the link to clear cache I get this:

    Error clearing cache..DELETE FROM wp_kish_translate WHERE pageid = [pageid] AND langid = ‘[lang-code]‘ LIMIT 1

    What went wrong? I use Php 5…

    Reply

  45. Kishore

    -Rajesh, Its a DB Error, I am going to release a tested stable version in a couple of days. Please hold on

    Reply

  46. Ajax Plugin For Wordpres Blog Translation | Kishore

    [...] Ajax WordPress Translation Plugin [...]

    Reply

  47. » Kish Translate - WordPress Plugins Catalog

    [...] Plugin Homepage » [...]

    Reply

  48. Incridiblog

    Hello Kishore
    I’m trying to use your plugin on my own blog. But i got an error like this

    Call to undefined function mb_convert_encoding() in /home/bursa/public_html/incridiblog.com/wp-content/plugins/kish-translate-ajax/functions.php on line 554

    How should i do?

    Thanks a lot for your time.

    Reply

  49. Phat^Trance

    im getting this error when trying to translate:
    ———————-
    Fatal error: Call to undefined function mb_convert_encoding() in /home/phat/public_html/wp-content/plugins/kish-translate-ajax/functions.php on line 542
    Permalink To Available Translations

    ——————-

    another streange thing is that under the permalinks in only getting arabic language and not the other languages
    ———————–

    Permalink To Available Translations

    Arabic | Kish Translate Ajax
    —————————

    Reply

  50. Phat^Trance

    forgot to mention that i have a wordpress 2.6.2 blog with php5

    Reply

  51. dario

    Hi! I love this plugin but why dont appear english even when is checked on the wordpress settings?

    pls check http://www.blackberrylatino.com/website-para-descargar-mp3-desde-tu-blackberry/

    there is a fade when is translated the text…

    Reply

  52. Kishore

    I am working on a new version with all the bugs to be cleared soon, hopefully I will updated the wordpress extend directory in a weeks time

    Reply

  53. ismail refik

    @Kishore, I am Turkey. but plugins not turkish languages options :(

    Reply

  54. Kishore

    @ismail – I have used Google Translate API and the availability of langauge is restricted to the the Google Translate API

    Reply

  55. Kishore

    I have uploaded a new version of Translation Plugin, which generates SEO Friendly Pages

    Reply

  56. Test driving Wordpress Plugins | thephotographer4you

    [...] WordPress 2.7 Coltrane interface I have notice some changes in one of my favorite plugins called Kish RR which translates several different languages. I received an error and it basically uninstalled [...]

    Reply

  57. dee

    Your plugin has stopped working with my WordPress 2.7 Coltrane upgrade. Please advise….I really would love to continue to use this plugin. I have a lot of traffic from abroad. Thanks a million.

    Reply

  58. Kishore

    dee – Please upgrade the plugin to latest version, Please hold on for version 1.7, which should be updated in 2-3 days, I have tested the plugin on 2.7

    Reply

  59. Kishore

    Updated version 1.7, hopefully all the bugs are cleared, please post the bugs at http://kish.in/translation-plugin-updated/

    Reply

  60. 4webmasters » Top 1000 WordPress Plugin Authors

    [...] Kish Translate [...]

    Reply

  61. En.nicuilie.eu Blogs » Top 1000 WordPress Plugin Authors

    [...] Kish Translate [...]

    Reply

  62. stefand

    Hi, I’ve added the plugin to my site (www.vareseautonoma.net/blog/) but i can’t see the widget to select the language… What’s the matter?

    Reply

    • Kishore

      Have you enabled the plugin in the settings. Please go the setting of Kish Translate and enable. Also please check if you have done the modifications for the theme

      Reply

      • jeff

        Hi Kish!
        I added the codes to the header.php but I dont have the single.php because it is a custom page so my programmer of the theme said that single.php and index.php that he made is the same so I added the code to index.php but I dont see the widget showing. I also enabled the theme and have the settings updated.

        Reply

  63. 5 Tips for Blogging in English If It’s Not Your Native Language

    [...] Kish Translate [...]

    Reply

  64. Host

    Thanks So Much

    Reply

  65. Josh

    this sounds like a great plugin. However I’m not able to get it working.
    I put that code in my template files and when i click to translate to a different language it brings me back to my home page but with a url like http://www.website.com/translation/es/post-title.html and everything is still in english. and when i check the folder i created for this plugin ‘translation” there is nothing in there..

    could this by my hosting ? or have i setup something wrong.

    Thanks!

    Reply

  66. Emily

    I always read your amazing website every week, its great fun and got lots of interesting information to take in and lots of interesting articles.

    Reply

  67. Gabriel

    the widget is not appearing in the widgets section, and how do i have to modify the single and header php files, do i have to place the code in some place or sustitute anything?

    Reply

  68. Kishore

    English is availabe in the drop down list – The text disappears because you blog back ground is black, this can be corrected by editing the fade function, change the color to a light color

    Reply

  69. Kishore

    mb_convert_encoding should be enabled in the php

    Reply

Leave a Reply

Follow

Get every new post delivered to your Inbox

Join other followers: