array_map( static fn ($file) => basename($file, '.json'), glob(resource_path('lang').'/*.json', GLOB_NOSORT) ), 'license' => file_get_contents(base_path('LICENSE')), 'title' => __('Configurazione'), ]); Route::get('lang/{language}', function ($language) { app()->setLocale($language); return redirect()->back(); })->name('language');