mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-06-01 20:29:29 +00:00
0319d0cc2a
- 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
32 lines
650 B
PHP
32 lines
650 B
PHP
<?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));
|
|
}
|
|
}
|