How to get the dispatched route name in Zend framework?

routes, xml, zend-framework, zend-router

Solution

Zend_Controller_Front::getInstance()->getRouter()->getCurrentRouteName()

Problem

Current state: - A router is loaded from xml file - two route name within the router are going to the same controller and action, for example: www-language-employee and www-language-trainer are going to the same controller and action --> EmployeeController & listemployeeAction Problem: - Need to know which route name is dispatched/being used from a request. Example: 1. http://www.mycompany.com/en/trainers/ Expected return value: www-language-trainer

Original source