Laravel gives us all the tools we need to localize our application. We can show translated strings and properly format dates, numbers, and currencies.
But one thing Laravel doesn't specify for us is how to determine which language to use.
In today's video, I'll show a simple middleware-based approach we have used successfully in our projects. It will give you a starting point to think about language selection in your app.
And after watching, don't forget to subscribe to our YouTube channel, so you don't miss future videos.
Here to help,
Joel
P.S. Even in this simple middleware example, we don't forget validation. We truly believe validation is an extremely important part of any Laravel app.