From b86c850b88b63fa1fbb90005f9d5d295e4ab73e4 Mon Sep 17 00:00:00 2001 From: Alex Tselegidis Date: Thu, 5 Nov 2015 20:13:44 +0100 Subject: [PATCH] Fixed the translation issue with the installation page. --- src/application/controllers/installation.php | 12 +++++++++--- src/assets/js/installation.js | 2 +- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/src/application/controllers/installation.php b/src/application/controllers/installation.php index 51b9051e..03cfca81 100644 --- a/src/application/controllers/installation.php +++ b/src/application/controllers/installation.php @@ -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 */ diff --git a/src/assets/js/installation.js b/src/assets/js/installation.js index 497caaf3..9d1fb242 100644 --- a/src/assets/js/installation.js +++ b/src/assets/js/installation.js @@ -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()),