onBeforeRoute() hook

The onBeforeRoute() hook gives us full control over the routing process and is usually used in order to:

We can also use it to:

Using onBeforeRoute() for i18n is already used in production. For any other use cases, open a GitHub ticket or reach out on Discord before starting to use onBeforeRoute() (currently, onBeforeRoute() is purposely limited but the limitations can be lifted in order to unlock new capabilities).

Example: