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?
$this->EE->lang->loadfile('uploader');
rather than$this->EE->lang->loadfile('upload');
?