Codeigniter multi language support using Google translate API

Hi friends, This post explains about codeigniter plugin development for multi-language support using google translate API. This is  my own contribution in Codeigniter framework. With using google translate API it is developed. The procedure and how to implement in our application is in below github link. Readme.txt will give complete procedure to implement in the application.

Codeigniter multi language support using Google translate API by Anil Kumar Panigrahi

Codeigniter multi language support using Google translate API by Anil Kumar Panigrahi

  download link for Codeigniter multi language support using Google translate API

Mainly 2 advantage are there using this contribution.

Uses of this contribution:


1) No Need to maintain all text in different languages in our application.

Clarification: In the multilingual support sites – we have text in English language. If we want to convert into different language we have to maintain other language text in our site. If we use this contribution, no need of maintaining different languages text in our site.


2) It supports ‘n’ number of languages.

Clarification : If we use normal multilingual then we can use it for 2 or 3 languages. If we want another language then we want to write complete text in that language. If we use this contribution, we can maintains ‘n’ number of languages.


This contribution require only one file.  i.e. translate.php

Anil Kumar Panigrahi

With more than 10 years experience in PHP and Founder of Anil Labs, a blog for PHP and related posts. contributed posts regarding CodeIgniter, CakePHP and Learn PHP online ... Contact : [email protected]

You may also like...

27 Responses

  1. George says:

    Nice Post, Thank you for sharing

  2. Keep posting stuff like this i really like it

  3. Prabhjeet says:

    perfect helper, thanks

  4. I’ve tried many times, but has not been successful and hard at all, what is wrong. why? thanks for the information

  5. Mohammad says:

    i m doing a project which is based on online exam and it will b run on server of a school which is connected with internet & other pcs are connected with that server so can we use this method ??

    is this work there ??

    reply me fast & if possible mail me i m posting my email id here

    [email protected]

  6. Dani says:

    Google Translate API v1 is deprecated, v2 costs money. Use Bing Translation API instead.

  7. Sona says:

    i tried. Its not working for me..

    • motilal says:

      this is not working showing this error plz help me as soon as posible Fatal error: Call to undefined function curl_init() in D:\xampp\htdocs\demo\ci\system\helpers\translate_helper.php on line 50

  8. Kazi Sanchoy Ahmed says:

    thank you for your nice post, but i can’t understand by “This contribution require only one file. i.e. translate.php”.

    I want to translate whole website from english to other language. So what will be the url in

    curl_setopt($ch, CURLOPT_REFERER, ” “); in your helper function. Please give me right solution..

  9. meganathan says:

    can you explain how to integrate ckeditor with codeigniter. I searched in many sites, but there is no step by step explanation.

    Thanks and regards,
    Meganathan. P

  10. priyanka says:

    You have used “”.$q.”&langpair=”.$lang_pair;
    in your translate_helper file .
    1.0 version is ommited by google please suggest new code.

    Priyanka Tripathi

  11. Hari says:

    this version depreciated. please post v2 version code.

  12. ravi says:

    this is very usefull

  13. Praveen says:

    Hi Anil,

    I tried today its not working.

  14. ram janam says:


    I use this but not working. I want to translate whole page. please tell me how to integrate this?

  15. neelam says:

    I need code according to v2 of Google api.

  16. Krunal says:

    Getting error something like this :

    [responseData] =>
    [responseDetails] => Please use Translate v2. See
    [responseStatus] => 403

    Any other way to simply translate any codeigniter application.?

  17. sri says:

    I don’t know how to set CURLOPT_REFERER can any help me please?

  18. Oliver Dev says:

    Instead of using Google translate API, you can use CodeIgniter’s own multilanguage functionality. Just enable the multilanguage on codeigniter site by enabling the hook and setting up language loader. Source:

  19. Apartamenti says:

    Is this still working ?

  20. JGlobal says:

    I try is not working, please fix it.

  1. May 29, 2010

    […] Codeigniter multi language support using google trans API […]

  2. June 27, 2012

    […] 4)Codeigniter multi language support using google translate API […]

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.