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

Stay on the same page on language change #14

Open
Ran-n opened this issue Apr 8, 2022 · 3 comments
Open

Stay on the same page on language change #14

Ran-n opened this issue Apr 8, 2022 · 3 comments
Labels
enhancement New feature or request

Comments

@Ran-n
Copy link
Contributor

Ran-n commented Apr 8, 2022

I've noticed that when you are on a page and change the language it is redirected to the base url.
It would be really nice that if im browsing on root/about/ and change the language to galician i wouldnt be redirected to root/gz/ but rather to root/gz/sobre

@kaiiiz
Copy link
Owner

kaiiiz commented Apr 24, 2022

This feature can be done with minor modifications. However, I'm currently not figured out which implementation is better when a page does not have the supported language:

  1. Only shows the available language for the page.
  2. Show all language that is supported by the site, but for a page that does not have correspondingly language, clicking the link will redirect to the homepage.
  3. Show all language that is supported by the site, but for a page that does not have correspondingly language, the entry in the language list is disabled (i.e., it's shown but not clickable).

I personally prefer solution 3. Any suggestions are welcome.

@kaiiiz kaiiiz added the enhancement New feature or request label Apr 24, 2022
@Nightfirecat
Copy link
Contributor

Option 3 seems the most usable for any given configuration, but I imagine option 2 would be reasonable also. (perhaps 404 instead of redirect to homepage)

@Ran-n
Copy link
Contributor Author

Ran-n commented Apr 27, 2022

Maybe number 3 but when you click it a custom alert message appears indicating that said page doesnt exist in the language clicked.
Also, if its not a lot of work, what would be best is to make it open so that the programmer can implement the behaviour they feel its best for each/all cases.

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

No branches or pull requests

3 participants