mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-23 09:52:22 +00:00
- Added new constants in config/constants.php:
- LANG_SESSION_ACTIVE_LANGUAGES
- LANG_SESSION_CURRENT_LANGUAGE
- Added new functions in helper hlp_language_helper:
- setUserLanguage
- getDBActiveLanguages
- getActiveLanguages
- Adapted code to make use of them
- Added new controller controllers/widgets/Language
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
if (! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
/**
|
||||
* This controller is used to set the current language for a user
|
||||
* It is part of the Language Switcher Widget
|
||||
*/
|
||||
class Language extends FHC_Controller
|
||||
{
|
||||
/**
|
||||
* Calls the parent's constructor
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------------------------------------------
|
||||
// Public methods
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public function setSessionLanguage()
|
||||
{
|
||||
$language = $this->input->post('language');
|
||||
|
||||
$this->outputJson(setUserLanguage($language));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user