code after rouing is completed

I need to put some code in an application that is procecced on every request and that is called between the route is resolved and the controller is called. This is to get the requested language (example.com/en/…). I could rewrite the url with ModRewite or maybe in a bootstap method called when onBeforeRequest fires. Or I can extend the base controller. But I am looking for a no-workaround-way…

Im not sure if onBeforeRequest runs before or after route parsing. of it is after then this would be the best place.

If not, extending CController and overriding onBeforeAction would be a good place.

I am using onBeforeRequest now to do some other jobs but $_REQUEST is empty.

Check this wiki, it might be of help:

http://www.yiiframework.com/wiki/55/i18n-subdomains-and-url-rules

I know this solution. I thought there is an event fired before the controller is called or it is possible to build a controller hierarchy…

Thank you.