Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
<?php
/**
* session_start_hook
*
* @param
* @return
*/
public function sessions_start_hook()
{
if( isset($_SESSION['transcribe']) && isset($_SESSION['transcribe']['abbreviation']) )
{
// CUSTOM CHANGE EE LANG VAR
switch($_SESSION['transcribe']['abbreviation'])
{
case 'es':
$lang = 'spanish';
break;
case 'zh':
$lang = 'chinese';
break;
case 'ru':
$lang = 'russian';
break;
default:
$lang = 'english';
}
$this->EE->config->config['deft_lang'] = $this->EE->config->config['language'] = $lang;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment