title: How to add route parameter before MVC choses a route
body: <p>I am trying to add support for different languages to existing MVC 3 application. So far my links were </p>
  
  <pre><code>oldUrl -&gt; myapp.com/Item/Details/5/some-title
  </code></pre>
  
  <p>And there are links to the website from different places on the web. But now I want to change the URL so the language is included:</p>
  
  <pre><code>newUrl -&gt; kmyapp.com/en/Item/Details/5/some-title
  </code></pre>
  
  <p>However I want the oldUrl links to be valid. And the question is how do I do this... The easiest way would be to add another route, but I already have too many of them and it is getting kind of ugly, and when I create urls from a page that doesn't have the language the links also don't have the language so I have to do something else then.</p>
  
  <p>Another way would be to override something that stands just before MVC tries to map the request to a specific route, but has already parsed the request url and filled the routeValues dictionary. So I can just check for the language and if it is not included in the route parameters I can add it on my own and call the implementation of the parent class to continue. Is that possible? What should I look at - <a href="http://msdn.microsoft.com/en-us/library/system.web.routing.urlroutingmodule.aspx">UrlRoutingModule</a>, <a href="http://msdn.microsoft.com/en-us/library/system.web.mvc.mvchttphandler.aspx">MvcHttpHandler</a> or something else? What can I override and how to tell MVC to use my version?</p>
  
  <p>Any other ideas would be also appreciated!</p>