Setting up locale based routing in Laravel with middleware

Laravel is an excellent framework that supports multilingual functionality out of the box - but it doesn't go as far as setting up the routing for you. Here's how you can achieve it with simple routing and middleware.