简体   繁体   中英

language can not change in grocery crud

I am using codeigniter with Grocery CRUD, I create a form with GC but the text in the required fields are in english and i want it in spanish. I read diferent documentation and I tray it but does not work.
This is my controller

$this->crud->set_table('test'); 
$this->crud->set_language('spanish');    
$this->crud->set_subject('Test');
$this->crud->columns('id_test','test'); 
$this->crud->required_fields('test');

$output = $this->crud->render();
$data['contents'] = 'contents';
$data = array_merge($data, (array) $output); 
$this->load->view('template', $data);

and in the view show like this

The text in the required field

Thanks in advance.

After a month I solve the problem. I add a folder Spanish in system/language/ and inside a form_validation_lang.php . Although I change in application/conf/conf.php the default language for Spanish

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM