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

前端 未结 1 1669
逝去的感伤
逝去的感伤 2021-01-14 07:03

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 undefined         


        
相关标签:
1条回答
  • 2021-01-14 07:55

    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 讨论(0)
提交回复
热议问题