Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switching languages in sub route does not change nasted paths #873

Open
NoahNxT opened this issue Jun 8, 2023 · 0 comments
Open

Switching languages in sub route does not change nasted paths #873

NoahNxT opened this issue Jun 8, 2023 · 0 comments

Comments

@NoahNxT
Copy link

NoahNxT commented Jun 8, 2023

When switching languages the route does not update the translated path in the url:

Route::prefix(LaravelLocalization::setLocale())
    ->middleware(['localize', 'localeSessionRedirect', 'localizationRedirect', 'localeViewPath'])
    ->group(function () {
        Route::prefix(LaravelLocalization::transRoute('exercises.route'))
            ->group(function () {
                Route::get('/', ExerciseOverviewController::class)->name('exercises');
                Route::get('{exercise}', ExerciseDetailController::class)->name('exercise.detail');
            });
    });

So when I'm on https://platform.lokal.host/en/exercises/1 and I switch to NL for example it does this https://platform.lokal.host/nl/exercises/1 instead of https://platform.lokal.host/nl/oefeningen/1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant