0

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?

2 Answers 2

3

To load language in codeigniter, Syntax is :

$this->lang->load('filename', 'language');

Not:

$this->load->lang();
Sign up to request clarification or add additional context in comments.

Comments

1

Try after load Helper file

$this->load->helper('language');

Comments

Your Answer

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.