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 selector and absolute path #401

Open
schoubi opened this issue Nov 18, 2024 · 0 comments
Open

Language selector and absolute path #401

schoubi opened this issue Nov 18, 2024 · 0 comments

Comments

@schoubi
Copy link

schoubi commented Nov 18, 2024

Hi,

I'm not quit sure to understand how to made the language selector working as it should.

i'm using

sphinx-build -b html src/doc /var/www/html/fr -D language=fr
sphinx-build -b html src/doc /var/www/html/en -D language=en

to build my translations.

Then my apache cordialy serve /var/www/html/ as https://bla.com/

My sphinx-immaterial is configure as :

        "languages": [
        {
            "name": "English",
            "link": "en/",  # points to ./en/ subdirectory
            "lang": "en",
        },
        {
            "name": "French",
            "link": "fr/",  # points to ./fr/ subdirectory
            "lang": "fr",
        },
    ]
        }

It's correctly generate a drop-down menu with "English" and "French".

So when i go on the english page, https://bla.com/en/ and then i choose French on the drop down menu , it redirect me to https://bla.com/en/fr/, if i choose English, it redirect me to https://bla.com/en/en/

Same on the french page.

I tried html_baseurl on the sphinx side, or site_url on sphinx-immaterial options, but no luck.

Can you point me something i'm missing ?

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