Reputation: 1320
I have extended CI's baked in form validation, however I'm having issues loading a language files. I have the following code:
class MY_Form_validation extends CI_Form_validation {
public function __construct() {
parent :: __construct();
$this->load->lang('raf');
}
However this throws the error:
Call to a member function lang() on a non-object
Can anyone spot the issue here?
Upvotes: 0
Views: 89
Reputation: 90
To load language in codeigniter, Syntax is :
$this->lang->load('filename', 'language');
Not:
$this->load->lang();
Upvotes: 3
Reputation: 2587
Try after load Helper file
$this->load->helper('language');
Upvotes: 1