我正在尝试将ion_auth与不同的语言一起使用
我猜默认是英语,我正在尝试使用法语
控制器
class Auth extends CI_Controller {
function __construct()
{
parent::__construct();
$this->load->library('ion_auth');
$this->load->library('form_validation');
$this->load->helper('url');
// Load MongoDB library instead of native db driver if required
$this->config->item('use_mongodb', 'ion_auth') ?
$this->load->library('mongo_db') :
$this->load->database();
$this->form_validation->set_error_delimiters($this->config->item('error_start_delimiter', 'ion_auth'), $this->config->item('error_end_delimiter', 'ion_auth'));
$this->lang->load('auth','french');
$this->load->helper('language');
/* $lang = $this->session->userdata('lang_name');
if(!isset($lang))
{ //load default language
$this->lang->load('site');
$this->lang->load('ion_auth');
$this->lang->load('auth');
}
else
{ //load language from session
// print_r('lang :'.$this->session->userdata('lang_name'));
$this->lang->load('site',$this->session->userdata('lang_name'));
$this->lang->load('ion_auth',$this->session->userdata('lang_name'));
$this->lang->load('auth',$this->session->userdata('lang_name'));
}*/
}
它总是在英语上永远不会变成法语或其他语言
<?php
$this->lang->load('auth','french');
?>
我也尝试过以上观点,法语永远不会改变