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

[Feature Request] Hide languages in selector #658

Open
matypist opened this issue Oct 15, 2024 · 2 comments
Open

[Feature Request] Hide languages in selector #658

matypist opened this issue Oct 15, 2024 · 2 comments

Comments

@matypist
Copy link

matypist commented Oct 15, 2024

Could a parameter be added to hugo.toml to hide single languages from the language selector (if set to true, default false)?

I'm using multilingual mode as a trick to have different menu items on different site sections and a similar function would be very useful

@alex-shpak
Copy link
Owner

Hi!
A quick-fix would be to overwrite template in your site
layouts/partials/docs/languages.html and just keep it empty

@matypist
Copy link
Author

Hi! A quick-fix would be to overwrite template in your site layouts/partials/docs/languages.html and just keep it empty

Thank you very much Alex, it is actually a correct solution to the feature request as I posed it, I explained myself very badly, I was referring to the possibility of hiding the individual languages from the language selector (without disabling them) where this parameter should be set to true, something like as follows:

[languages.it]
    contentDir = 'it'
    disabled = false
    **hidden = true**
    languageName = 'Italiano'
    title = 'Italian'
    weight = 0

    [languages.it.params]
        contentDir = 'it'

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