Skip to content

Instantly share code, notes, and snippets.

@jjpmann
Created June 17, 2013 17:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jjpmann/5798575 to your computer and use it in GitHub Desktop.
Save jjpmann/5798575 to your computer and use it in GitHub Desktop.
<?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