Using custom middleware to intercept each request and validate URI prefix as a current app locale.
- PHP
- Composer
- Clone the repo;
git clone git@github.com:boolfalse/laravel-localization.git && cd laravel-localization/- Install dependencies;
composer install- Create a new
.envfile;
cp .env.example .env- Generate a new
APP_KEY;
php artisan key:generate- Refresh the cache;
php artisan optimize- Run the server;
php artisan serve-
Attached Medium article: A solid way to add multi-language support to your Laravel app