Skip to content
Discussion options

You must be logged in to vote

You can add the following code to your routes to redirect the user to the correct route based on the browser language:

Route::redirect('/', '/'.request()->getPreferredLanguage(['de', 'fr']));

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by helloDanuk
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
2 participants