Hi there, I need to know how can I merge these routers into one? I want to have just one router instead of these ones. I appreciate any answer.:)
$route = new Zend_Controller_Router_Route_Regex(
'([a-z]{2})/(\w+)/(\w+)/(\w+)',
array('controller'=>'index',
'action' => 'index',
'module'=>'default',
'lang'=>$lang
),
array(
1=>'lang',
2=>'module',
3=>'controller',
4=>'action'
)
);
$router->addRoute('default_lang_action', $route);
$route = new Zend_Controller_Router_Route_Regex(
'([a-z]{2})/(\w+)/(\w+)',
array('controller'=>'index',
'action' => 'index',
'module'=>'login',
'lang'=>$lang
),
array(
1=>'lang',
2=>'module',
3=>'controller'
)
);
$router->addRoute('default_lang_con', $route);
$route = new Zend_Controller_Router_Route_Regex(
'([a-z]{2})/(\w+)',
array('controller'=>'index',
'action' => 'index',
'module'=>'default',
'lang'=>$lang
),
array(
1=>'lang',
2=>'module'
)
);
$router->addRoute('default_lang_mod', $route);
$route = new Zend_Controller_Router_Route_Regex(
'([a-z]{2})',
array('controller'=>'index',
'action' => 'index',
'module'=>'default',
'lang'=>$lang
),
array(
1=>'lang'
)
);
$router->addRoute('default_lang', $route);