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 language while preserving site location #74

Closed
sedubois opened this issue Jan 28, 2024 · 1 comment
Closed

Switching language while preserving site location #74

sedubois opened this issue Jan 28, 2024 · 1 comment
Assignees
Labels
question Further information is requested

Comments

@sedubois
Copy link

If, say, a home page has an English and a French version, one could provide a language switcher as follows:

  • add an "English" link pointing to /en in the French version of the home page navigation
  • add a "French" link pointing to /fr in the English version of the home page navigation

However, when switching language from other pages (e.g. Careers), the viewer will then be redirected to the home page instead of being shown the Careers page in the alternate language. How to ensure each page's language switcher links to its alternative language version(s) instead of linking back home?

@did did self-assigned this Mar 23, 2024
@did did added the question Further information is requested label Mar 23, 2024
@did
Copy link
Contributor

did commented Mar 29, 2024

@sedubois I wrote some doc about it here -> https://docs.maglev.dev/guides/setup-multiple-languages#locale-switcher

@did did closed this as completed Mar 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants