in a custom add-on I am writing I am using Upload library. I cannot use $this->EE->load->library function because I'm rewriting some code, so I'm creating instance using this code:

if ( ! class_exists('CI_Upload'))
    require_once BASEPATH.'libraries/Upload.php';

if ( ! class_exists('EE_Upload'))
    require_once APPPATH.'libraries/EE_Upload.php';
    $UP = new EE_Upload;

The error messages that Upload class may return are stored in /codeigniter/system/language/english/upload_lang.php file (so in CodeIgniter folder, not in ExpressionEngine folder)

I added $this->EE->lang->loadfile('upload'); in the beginning of the function that - but that does not help, I still see error message keys, not their language values.

Any help on how to load CodeIgniter's language file into add-on?

  • Hi Yuri, Did you try $this->EE->lang->loadfile('uploader'); rather than $this->EE->lang->loadfile('upload');?
    – joedixon
    Oct 2, 2013 at 8:56
  • sorry, file name is upload_lang.php, not uploader_lang.php Oct 2, 2013 at 10:20


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.