> Any ideas?

//file app/config/routes.php
$routes = array(
        '/' => array('controller' => 'pages', 'action' => 'display', 'home'),
        '/page/*'               => array('controller' => 'pages', 'action' => 
'display'),
        '/language/*'   => array('controller' => 'pages', 'action' =>
'selectLanguage'),
        '/login/*'              => array('controller' => 'users', 'action' => 
'login'),
);

//next line merge with Your own solution for determining of
selected/allowed/default language
$language = 'en_US';

foreach ($routes as $key => $value) {
        $value['language'] => $language;
        $Route->connect($key, $value);
        $Route->connect('/'.$language.'/'.$key, $value);
}

$Route->connect('/'.$language.'/:controller/:action', array('language'
=> $language));


.......and then take a look to $this->params['language'] in Your
controller. Last line is only example how to route default
/controller/action routes, so You will probably want to repeat this
line for 'bare' calls etc... ;-)


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~----------~----~----~----~------~----~------~--~---

Reply via email to