Fixed the translation issue with the installation page.

This commit is contained in:
Alex Tselegidis 2015-11-05 20:13:44 +01:00
parent 6adf0abf8d
commit b86c850b88
2 changed files with 10 additions and 4 deletions

View file

@ -26,6 +26,15 @@ class Installation extends CI_Controller {
public function __construct() {
parent::__construct();
$this->load->helper('installation');
$this->load->library('session');
// Set user's selected language.
if ($this->session->userdata('language')) {
$this->config->set_item('language', $this->session->userdata('language'));
$this->lang->load('translations', $this->session->userdata('language'));
} else {
$this->lang->load('translations', $this->config->item('language')); // default
}
}
@ -93,9 +102,6 @@ class Installation extends CI_Controller {
));
}
}
}
/* End of file installation.php */

View file

@ -28,7 +28,7 @@ $(document).ready(function() {
$('#install').click(function() {
if (!validate()) return;
var postUrl = GlobalVariables.baseUrl + '/index.php/appointments/ajax_install';
var postUrl = GlobalVariables.baseUrl + '/index.php/installation/ajax_install';
var postData = {
'csrfToken': GlobalVariables.csrfToken,
'admin': JSON.stringify(getAdminData()),