Localization (1)


Laravel 5.5 – Localization from scratch

Hi, in this post I will show how you can use localization, remember that there more than one way to do it. For example, you can make a Middleware to handle the localization from User preferences, you can get the localization from specific route, from GeoLocalization, etc…

In our example we will make a middleware to check if a session has locale and if had, the middleware will change the locale of your app and we will make some routes only to test it.

First step, create a fresh installation of Laravel let’s do it, open your terminal and type: