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

Is it possible to set the language for a specific page? #79

Open
BoboTiG opened this issue Feb 14, 2025 · 3 comments
Open

Is it possible to set the language for a specific page? #79

BoboTiG opened this issue Feb 14, 2025 · 3 comments

Comments

@BoboTiG
Copy link
Contributor

BoboTiG commented Feb 14, 2025

I have a multilang website, example:

The default lang is "fr" for the whole website.

Here is the HTML context:

{
    "languages": [
        ("Français", "/", "fr"),
        ("English", "/en/", "en"),
    ],
}

The result is almost correct:

  • as the default lang is "fr", all admonitions and stuff are in French
  • same on the English page (this is a problem)

How can I properly setup languages in general, or at least provide a specific language for a given page?

@BoboTiG
Copy link
Contributor Author

BoboTiG commented Feb 14, 2025

Here is the conf file for reference: https://github.com/BoboTiG/luma/blob/main/sources/conf.py

@lepture
Copy link
Owner

lepture commented Feb 15, 2025

This is related to sphinx itself. I don't think Sphinx supports this feature. Here is how I implement multiple languages https://github.com/authlib/joserfc

@BoboTiG
Copy link
Contributor Author

BoboTiG commented Feb 15, 2025

I think I setup languages properly, but all texts are still in French. OOC can you spot anything wrong with the current conf.py file?

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