[英]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. 我在Grocery CRUD中使用codeigniter,并在GC中创建了一个表单,但必填字段中的文本为英文,我希望用西班牙语。 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 . 我在
system/language/
以及form_validation_lang.php内添加一个西班牙语文件夹。 Although I change in application/conf/conf.php
the default language for Spanish 虽然我在
application/conf/conf.php
中更改了西班牙语的默认语言
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.