Welcome Guest, Not a member yet? Register   Sign In
change language in validation error message. How to get it work?

I followed every steps in user guide but can't get it right, hope you can help me.
I'm making a newsletter subscribing, user will provide email, if fail validation, they see error message in Vietnamese instead of English. I don't know what steps missed out.

My controller:

class Home extends Controller {
    function Home()
        $this->form_validation->set_error_delimiters('<span class="error">', '</span>');

    function index()
        $data['submit_success'] = '';
        if($this->form_validation->run() == FALSE)
            $this->load->view('home_view.php', $data);
            $input = array('email'=> $this->input->post('email'));
            $this->db->insert('mail_list', $input);
            $data['submit_success'] = 'Đang kí hoàn tất';
            $this->load->view('home_view.php', $data);

My view:
Quote: &lt;form class="sub_form" method="post" action="&lt;?=site_url('home')?&gt;"&gt;

&lt;input type="text" name="email" value="email" class="submail" /&gt;
&lt;input type="submit" value="submit" /&gt;&lt;br />

My customized error message in vietnamese language file is located at

here is how it look like
$lang['required']             = "Cần phải cung cấp %s.";
$lang['valid_email']        = "%s không hợp lệ.";

Theme © iAndrew 2016 - Forum software by © MyBB