[eluser]James Gifford[/eluser]
I am using the new form_validation library and I can't get the new shortcut syntax for field translations to work.
Here's what I'm trying to do:
Code:
$this->lang->load('login');
$this->load->library('form_validation');
$this->form_validation->set_rules(array(
array('field' => 'username', 'label' => 'lang:username', 'rules' => 'required'),
array('field' => 'password', 'label' => 'lang:password', 'rules' => 'required')));
if ($this->form_validation->run())
...
This results in the fields being named 'lang:username' and 'lang:password' respectively. If I replace the shorthand syntax with something like $this->lang->line('username') then it works just fine.
Is anyone else having problems with this aspect of the form_validation library? Or is there some setting or something that I missed?