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

Language redirection not working #218

Open
iseeberg79 opened this issue Jan 22, 2024 · 1 comment
Open

Language redirection not working #218

iseeberg79 opened this issue Jan 22, 2024 · 1 comment

Comments

@iseeberg79
Copy link

Hello,
in our setup the language redirection is not working as expected. Sites are almost every time displayed in "en". I'd like to suggest to change the fallback from static redirection to organizational settings language if detection fails. This is much more flexible and a workaround for not having the language detected automatically.

I am unsure why redirects aren't working as expected. Probably it has to do with missing cookies. I am unsure why they aren't added but it might have to do with the paths the application is using and NEXT_LOCALE cookie as we aren't landing on path "/" but getting redirected.

A change might be required here:
admin-ui/src/middleware.ts: const locale = req.cookies.get('NEXT_LOCALE')?.value || 'en';
booking-ui/src/middleware.ts: const locale = req.cookies.get('NEXT_LOCALE')?.value || 'en';

If I am wrong could you please explain and help solving the issue? Why language redirection is not working as expected? If users are using the language code in the application paths it's working - at least until switching between administration and booking for example.

kind regards,
Ingo

@MaisKolben
Copy link

Same here.

we are using Seatsurfing behind a Nginx Proxy Manager, so the Docker Container is working at http://localhost:8080 and get reverse proxied via NPM. The Public URL is set on out TLD with Subdomain.

The redirection to german is not working at this configuration and we got only default /ui /admin.

The idea of @iseeberg79 could be an option to make this a lot easier.
An option from another Issue was to make the default language depend on the organization settings.

At this state we can't use this very nice Tool and it would be just nice to have an update soon, which could solve this issue.

Kind regards,
Alex

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

2 participants