0

I just install 'mcamara/laravel-localization' after install follow to steps and add

Route::group(
[
    'prefix' => LaravelLocalization::setLocale(),
    'middleware' => [ 'localeSessionRedirect', 'localizationRedirect', 'localeViewPath' ]
], function(){ //...
});

to my route. After that, I encounter

Mcamara\LaravelLocalization\Exceptions\SupportedLocalesNotDefined
Supported locales must be defined.

I guess it is not read to the config file for Supported locales array. So don't know how to fix it. I am using laravel 7.19.1. I need help.

Vadim Kotov
  • 8,084
  • 8
  • 48
  • 62
officialmmt
  • 65
  • 1
  • 2
  • 12

2 Answers2

2

look.. if you have this line in Web.php file

Route::group(['prefix' => LaravelLocalization::setLocale(), 'middleware' => ['localeSessionRedirect', 'localizationRedirect', 'localeViewPath']], function ()

1- make it's as comment and run in terminal : php artisan config:clear. php artisan config:cache.

2- then delete comment from line.

Lukas
  • 2,263
  • 1
  • 4
  • 15
Abdo Hazem
  • 21
  • 4
1
php artisan config:cache

is fixed all.

officialmmt
  • 65
  • 1
  • 2
  • 12