$lankey = substr($_SERVER['REQUEST_URI'], 1, 2);
if($modx->context->get('key') != "mgr"){
//grab the current domain from the http_host option
switch ($lankey) {
case 'en':
//switch the context
$modx->switchContext('en');
//set the cultureKey
$modx->setOption('cultureKey', 'en');
break;
default:
// Set the default language/context here
$modx->switchContext('web');
$modx->setOption('cultureKey', 'ru');
break;
}
}
Вот красиво же, чего у меня то же самое идет 1 строкой не понимаю
Updated 7 Nov. 2012, 20:57 by SergeyMiracle.