开发者

Codeigniter - Unable to call system's lang() function

开发者 https://www.devze.com 2023-02-26 16:00 出处:网络
Trying to call lang() function that is part of codeigniter\'s system/helpers (language_helper.php), resulting in a Fatal error

Trying to call lang() function that is part of codeigniter's system/helpers (language_helper.php), resulting in a Fatal error

Fatal error: Call to undefin开发者_开发知识库ed function lang()

$def_actions['add'] = array('name' => lang('carbogrid_add'), 'alias' => 'add', 'url' => $this->add, 'icon' => 'ui-icon-circle-plus', 'toolbar' => TRUE, 'grid' => FALSE);


You have to load the helper before doing that:

$this->load->helper('language');

$def_actions['add'] = array('name' => lang('carbogrid_add'), 'alias' => 'add', 'url' => $this->add, 'icon' => 'ui-icon-circle-plus', 'toolbar' => TRUE, 'grid' => FALSE);
0

精彩评论

暂无评论...
验证码 换一张
取 消