2009年1月20日星期二

[fw-mvc] Language + Default route

I have defined a route for language and a default route when NO language is
given.

$route = new Zend_Controller_Router_Route(
':module/:controller/:action/',
array(
'module' => 'default',
'controller' => 'index',
'action' => 'index'
)
);
$router->addRoute('default', $route);

$route = new Zend_Controller_Router_Route(
':language/:module/:controller/:action/',
array(
'language' => new Zend_Locale(),
'module' => 'default',
'controller' => 'index',
'action' => 'index'
)
);
$router->addRoute('lang_default', $route);


Problem is, when I defined the language route, I've set that there will
always be a default language.
So the default route (without language) will never be called.


What can I do to make the default route available?


Thanks in advance.
--
View this message in context: http://www.nabble.com/Language-%2B-Default-route-tp21561520p21561520.html
Sent from the Zend MVC mailing list archive at Nabble.com.

没有评论: