Articles CodeIgniter

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


  • Reply
    Gadget Newz
    May 29, 2010 at 5:02 am

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

  • Reply
    June 3, 2010 at 8:40 pm

    Nice Post, Thank you for sharing

  • Reply
    ultrasound technician
    June 6, 2010 at 7:41 am

    Keep posting stuff like this i really like it

  • Reply
    Srinivas Tamada
    June 9, 2010 at 5:42 am

    Good one

    • Reply
      September 23, 2014 at 9:56 am

      ya its cool bro..

  • Reply
    June 26, 2010 at 3:01 am

    perfect helper, thanks

  • Reply
    February 4, 2011 at 5:29 am

    Good one.. 🙂

  • Reply
    penerjemah tersumpah
    April 20, 2011 at 3:22 pm

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

  • Reply
    August 25, 2011 at 12:55 pm

    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]

  • Reply
    March 5, 2012 at 9:23 pm

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

  • Reply
    June 18, 2012 at 6:37 am

    i tried. Its not working for me..

    • Reply
      March 16, 2013 at 11:35 am

      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

  • Reply
    Top 10 most viewed posts in anil labs - Anil Labs
    June 27, 2012 at 5:34 pm

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

  • Reply
    Kazi Sanchoy Ahmed
    September 24, 2012 at 7:44 am

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

  • Reply
    February 6, 2013 at 1:07 pm

    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

  • Reply
    May 2, 2013 at 1:34 pm

    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

  • Reply
    July 9, 2013 at 3:36 pm

    this version depreciated. please post v2 version code.

  • Reply
    January 20, 2014 at 5:15 am

    this is very usefull

  • Reply
    April 23, 2014 at 11:43 am

    Hi Anil,

    I tried today its not working.

  • Reply
    ram janam
    May 19, 2014 at 1:36 pm


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

  • Reply
    June 10, 2014 at 5:36 am

    I need code according to v2 of Google api.

  • Reply
    November 15, 2016 at 10:40 am

    Getting error something like this :

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

    Any other way to simply translate any codeigniter application.?

  • Reply
    April 10, 2017 at 12:37 pm

    Good one.. ?

  • Reply
    December 11, 2017 at 10:01 am

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

  • Reply
    Oliver Dev
    February 6, 2018 at 1:36 pm

    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:

  • Reply
    May 11, 2018 at 8:00 pm

    Is this still working ?

  • Reply
    August 20, 2018 at 3:06 am

    I try is not working, please fix it.

Leave a Reply

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