How to replace routes generated with MapMvcAttributeRoutes

I'm trying to extend attribute generated routes with localization (http://www.nuget.org/packages/routelocalizationmvc, similar as it worked in AttributeRouting with MVC 4.0).
Since there is no possibility to hook into the route generation process (e.g. custom route builder / etc) the only possibility is to replace the created routes afterwards with own routes.

This is feasible with 5.0 (since MapMvcAttributeRoutes just adds Route instances) but in 5.1 this is changed to RouteCollectionRoute and GenerationRoute. Both classes are internal, so without reflection it is not possible to wrap and extend those created instances.
Will this be changed in future or would be your suggestion to achieve that?

We're working on some improvements to MVC's attribute routing right now so I'm forwarding this discussion to the two developers who are working on this and we can see what thoughts they have regarding this.

For 5.1, we added IDirectRouteProvider, which allows customizing the route instance on a per-attribute basis. The
feature spec has further details.

If you want to customize a large number of route attributes, you could use a custom base class, something like CustomRouteAttribute, that derives from attribute and implements IDirectRouteProvider to customize the route as needed.

I think its going into a good direction. Is it possible to build upon the RouteAttribute (without replacing existing RouteAttributes)? For example, can a custom DirectRouteProviderContext be injected or is this "hardcoded"?

The extension should be easy to use and if it forces to replace every route attribute, this would be a big drawback.

We currently don't provide a way to have a custom DirectRouteProviderContext implementation. If you want to customize how attribute routes are created everywhere, using a custom route base class is currently the only way to do so.

Feel free to log a bug if you'd like us to provide another mechanism. Notes about the details of your scenario would be particularly helpful.

Atm translated routes are just replaced (RouteCollection.Remove and Insert) with an custom Route (TranslationRoute). This adds features like Culture detection from current route browsed or smart outbound route generation (a route generated uses the translated
variant for the current culture).

I see that I can now use IDirectRouteProvider to hook into the RouteGeneration by modifying the RouteEntry returned from the builder, but it would be nicer if the user would not be forced replacing all attributes.

Is there any other possibility that comes in your mind that could achieve this?