logo
podcast Podcast
get help Get Unstuck

A simple approach to localization using middleware

Only one file

Joel Clermont
Joel Clermont
2025-09-05

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.

Watch Now (5 min)

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.

Toss a coin in the jar if you found this helpful.
Want a tip like this in your inbox every weekday? Sign up below 👇🏼
email
No spam. Only real-world advice you can use.