context->get('key') != "mgr" ) { /* grab the current langauge from the cultureKey request var */ switch ( $_REQUEST['cultureKey'] ) { case 'en': /* switch the context */ $modx->switchContext('en'); setlocale(LC_ALL, 'en_US.UTF-8'); break; case 'nl': /* switch the context */ $modx->switchContext('nl'); setlocale(LC_ALL, 'nl_NL.UTF-8'); break; default: /* Set the default context here */ $modx->switchContext('web'); setlocale(LC_ALL, 'de_DE.UTF-8'); break; } /* unset GET var to avoid * appending cultureKey=xy to URLs by other components */ unset($_GET['cultureKey']); }