Welcome Guest, Not a member yet? Register   Sign In
[Solved] Unable to load the requested language file: language/form_validation_lang.php
#1

[eluser]koskoz[/eluser]
Hi everybody,
I think everything is in the title.

I'm using language files and I have this error when I use the validation class.

I'm running the 1.7.1.
#2

[eluser]koskoz[/eluser]
More infos about this bug.

Here is my function :

Code:
public function form()
    {
        // We load the necessary helpers
        $this->load->helper(array('form'));
        // We load the necessary librairies
        $this->load->library('form_validation');
        // We load the necessary models
        $this->load->model('admin/admin_model', 'model');

        // We pass some datas to the view
        $data['page_title'] = $this->lang->line('page_title');
        $data['title'] = $this->lang->line('title');
        $data['label_pseudo'] = $this->lang->line('label_pseudo');
        $data['label_password'] = $this->lang->line('label_password');
        $data['value_connection'] = $this->lang->line('value_connection');
        $data['bad_id_msg'] = $this->lang->line('bad_id_msg');

        // We fix some rules to the forms
        $this->form_validation->set_rules('pseudo', 'lang:pseudo', 'trim|required');
        $this->form_validation->set_rules('password', 'lang:password', 'trim|required');

        if ($this->form_validation->run() == FALSE) {
            $data['bad_id'] = FALSE;
            $this->load->view('admin/login_form_view', $data);
        }
        else {
            $sql = $this->model->user_exist($_POST['pseudo'], md5($_POST['password']), 1);

            if ($sql->num_rows() == 1) {

                $row = $sql->row();

                // We had some infos in the session
                $login_infos = array(
                   'pseudo' => $row->pseudo,
                   'access' => $row->access,
                   'logged_in' => TRUE
                );
                $this->session->set_userdata($login_infos);

                $this->pannel();
            }
            else {
                $data['bad_id'] = TRUE;
                $this->load->view('admin/login_form_view', $data);
            }
        } // if validation
    } // login

If I comment this two lines, it's ok :
Code:
$this->form_validation->set_rules('pseudo', 'lang:pseudo', 'trim|required');
        $this->form_validation->set_rules('password', 'lang:password', 'trim|required');
#3

[eluser]jpi[/eluser]
Be sure that /application/language/french/form_validation_lang.php exists.
And also check that $config['language'] is properly set.
#4

[eluser]koskoz[/eluser]
I don't use any "form_validation" language file :o

Edit : ow, I didn't know that there were any other language files, thanks !




Theme © iAndrew 2016 - Forum software by © MyBB