Add language switch functionality: Implemented a new route for switching languages, allowing users to change the application language dynamically. Introduced a language selector component in the navbar for improved user experience, ensuring proper localization support. Updated the switch_language helper function to streamline locale management.
This commit is contained in:
@@ -181,10 +181,7 @@ if (!function_exists('switch_language')) {
|
||||
}
|
||||
|
||||
app()->setLocale($languageCode);
|
||||
|
||||
if (auth()->check()) {
|
||||
session(['locale' => $languageCode]);
|
||||
}
|
||||
session(['locale' => $languageCode]);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user