[BabelLinks? &showUnpublished=`0` &tpl=`LanguageFlags`]°
(remplacer le * par un [ et le ° par ])
<?php
if($modx->context->get('key') != "mgr"){
/* grab the current langauge from the cultureKey request var */
switch ($_REQUEST['cultureKey']) {
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']);
}
chunk "LanguageFlags"
*[IF? &subject=`*[+id]°` &operator=`notempty` &then=`
<a href="*[+url]°" class="langue_flag *[+cultureKey]° *[+active:notempty=` *[+active]°`]°"><img src="*[++site_url]°manager/templates/eleo/images/*[+cultureKey]°.gif" title="*[%babel.language_*[+cultureKey]°? &topic=`default` &namespace=`babel`]°" /></a>
`]°
(Remplacer les * par des [ et les ° pas des ] )
# Added on due to Babel configuration
# The Friendly URLs part
# detect language when requesting the root (/)
#RewriteCond %{HTTP:Accept-Language} !^fr [NC]
#RewriteRule ^$ fr/ [R=301,L]
#RewriteCond %{HTTP:Accept-Language} !^en [NC]
#RewriteRule ^$ index.php?id=8 [R=301,L]
# redirect all requests to /en/favicon.ico and /de/favicon.ico
# to /favicon.ico
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(fr|en)/favicon.ico$ favicon.ico [L,QSA]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(fr|en)/manager/templates/eleo(.*)$ manager/templates/eleo$2 [L,QSA]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(fr|en)/images(.*)$ images$2 [L,QSA]
# redirect all requests to /fr/assets* and /en/assets* to /assets*
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(fr|en)/assets(.*)$ assets$2 [L,QSA]
# redirect all other requests to /fr/* and /en/*
# to index.php and set the cultureKey parameter
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(fr|en)?/?(.*)$ index.php?cultureKey=$1&q=$2 [L,QSA]
# END OF Add du to Babel configuration...
# This has been commented on the 16-june-2011 due to Bebl configuration
## # The Friendly URLs part
## RewriteCond %{REQUEST_FILENAME} !-f
## RewriteCond %{REQUEST_FILENAME} !-d
## RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]