Hi
Sorry for the intrusion to your discussion but maybe you can help me with babel and Modx. I have started to use Modx 2 weeks ago and I think it is great. I need to create a web site for a client adn use multilanguage capabilities. SO before digging into the web site implementation I wanted to test the Modx and the multilanguage babel extra. I use this configuration:
- Modx 2.3.3 with bitnami installation
- Babel 3.0.0-beta2
I have two installtions:
1) bitnami modx in the Azure machine
2) bitnami modx in local machine
I have followed the instructions on the
http://designfromwithin.com/blog/modx-multilingual
blog and i have only two languages (it for the it contects, and en for the web context)
but both of the installation are not working
when I test the multilanguage e.g. mysite/en/ I get 404 PAge not found
Here the gateway plugin:
<?php
if($modx->context->get('key') != "mgr"){
/* grab the current langauge from the cultureKey request var */
switch ($_REQUEST['cultureKey']) {
case 'it':
/* switch the context */
$modx->switchContext('web');
break;
case 'en':
/* switch the context */
$modx->switchContext('en');
break;
default:
/* Set the default context here */
$modx->switchContext('web');
break;
}
/* unset GET var to avoid
* appending cultureKey=xy to URLs by other components */
unset($_GET['cultureKey']);
}
?>
here the .htaccess setup:
RewriteEngine On
#RewriteBase /
# Rewrite www.domain.com -> domain.com -- used with SEO Strict URLs plugin
#RewriteCond %{HTTP_HOST} .
#RewriteCond %{HTTP_HOST} !^http://localhost:8888/modx/ [NC]
#RewriteRule (.*) http://localhost:8888/modx/$1 [R=301,L]
#
# or for the opposite domain.com -> www.domain.com use the following
# DO NOT USE BOTH
#
#RewriteCond %{HTTP_HOST} .
#RewriteCond %{HTTP_HOST} !^www\.example-domain-please-change\.com [NC]
#RewriteRule (.*)
http://www.example-domain-please-change.com/$1 [R=301,L]
# Rewrite secure requests properly to prevent SSL cert warnings, e.g. prevent
#
https://www.domain.com when your cert only allows
https://secure.domain.com
#RewriteCond %{SERVER_PORT} !^443
#RewriteRule (.*)
https://example-domain-please-change.com/$1 [R=301,L]
# The Friendly URLs part
#RewriteCond %{REQUEST_FILENAME} !-f
#RewriteCond %{REQUEST_FILENAME} !-d
#RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
# detect language when requesting the root (/)
RewriteCond %{HTTP:Accept-Language} !^(it|en) [NC]
RewriteRule ^$ it/ [R=301,L]
RewriteRule ^$ en/ [R=301,L]
# redirect all requests to /de/favicon.ico and /nl/favicon.ico
# to /favicon.ico
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(it|en)/favicon.ico$ favicon.ico [L,QSA]
# redirect all requests to /de/assets* and /nl/assets* to /assets*
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(it|en)/assets(.*)$ assets$2 [L,QSA]
# redirect all other requests to /de/* and /nl/*
# to index.php and set the cultureKey parameter
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(it|en)?/?(.*)$ index.php?cultureKey=$1&q=$2 [L,QSA]
Attached there are the two contexts setup and the resources tree.
I have spent 4 days untill now and read all the port on the web a tried many thing but I cannot have the babel and modx working
Pleaseeeee helppp!!!!
Thanks so much
Alberto