views:

12

answers:

0

I have several chained routes that handle the multi-lingual feature of my site. Sample:

$languageRoute = new Zend_Controller_Router_Route_Regex('(de|en|es|fr|it|ja|ko|pt|ru|zh)',
 array(1 => 'en',),
 array(1 => 'language'),
 '%s'
);
$defaultRoute = new Zend_Controller_Router_Route('*',
 array('module' => 'default',
  'controller' => 'pages',
  'action' => 'index')
);
$router->addRoute('default', $defaultRoute );
$router->addRoute('getMatchedPath',$languageRoute->chain($defaultRoute) );

They work great. Now I need to figure out what route was in-acted to get where I am. If I access the site through the default route (/pagename/otherdetails : no language ID ) I can call :

Zend_Controller_Front::getInstance()->getRouter()->getCurrentRoute()->getMatchedPath();

And I get pagename/otherdetails just want I'm looking for. However, if I use a chained route ( /fr/pagename : french language ID ) I can't figure out how to pagename/otherdetails out. I know it's there, because you can see it if you

print_R(Zend_Controller_Front::getInstance()->getRouter()->getCurrentRoute());

but I can't figure out a way to access it. Am I missing something? If not, what do you think the easiest way is to grab this information?

thanks summer