I'm struggling to get the Babel addon to work. Everything was working fine before installing Babel.
I've succesfully set Contexts and installed Babel with the help of these 2 tutorials:
I'm trying to test a configuration where different language versions are in the URL in a format like
www.domain.com/LANGUAGE
I'm receiving either 503 error on the root URL or 404 error in the language specific URLs ( ..../fi).
Any pointers?
What is
getOption('http_host') actually returning? I coudn't find that from the Revo documentation.
I'm new with Revo and Babel. Most likely I'm missing something on the server side.
Example of my cultureKey and site_url settings (Finnish site):
This is the gateway code I've been using, found from the tutorials:
//make sure our plugin does not run on the mgr context (the manager)
if($modx->context->get('key') != "mgr"){
//grab the current domain from the http_host option
switch ($modx->getOption('http_host')) {
case 'http://domain.com/~folder/modx_installation/fi':
//switch the context
$modx->switchContext('fi');
//set the cultureKey
$modx->setOption('cultureKey', 'fi');
break;
default:
// Set the default language/context here
$modx->switchContext('us');
$modx->setOption('cultureKey', 'us');
break;
}
}