-
Notifications
You must be signed in to change notification settings - Fork 32
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 switch to currently opened page #349
Comments
I guess we can apply that patch, but what happens if a version of the site does not have the page that |
As far as I understand, Sphinx uses gettext with .po files for localization. I.e. the page structure should be the same and in case there is no translation - default language will be shown. Or do you mean there could be an issue with some other localization approaches? |
How accurate is this assumption? You could actually do some clever stuff with |
Also, FYI, we have contribution guidelines about unwanted changes. Notice the part about the src directory (the HTML templates included). In upstream mkdocs-material, they too don't add to the base URL either. Fortunately, as for overriding the template, this will become much easier when we merge in the updates from upstream (#338). The file to override would be |
This looks like a good option. Thank you! |
Hello,
Thank you for maintaing this repo
I would like to make an adjustment to the language switch functionality so that it redirects to the currently opened page instead of some default page.
From what I can see, the only option currently available to implement this is by adding
href="{{ pathto(alt.link + pagename) }}"
to header.html. And this is only possible by copying and overwriting header.html template.Is there a solution that doesn't require overwriting the entire header template?
The text was updated successfully, but these errors were encountered: