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 switcher is sometimes displayed even when there is only one language #71

Open
joeroe opened this issue Apr 9, 2024 · 0 comments

Comments

@joeroe
Copy link
Owner

joeroe commented Apr 9, 2024

But this seems to depend on some config. Compare the example site (one language, so no language switcher) and SSLARCH (one language, but phantom language switcher), for example.

See #70 and #44.

zandi added a commit to zandi/risotto that referenced this issue Jun 12, 2024
…joeroe#71

The `hugo.IsMultilingual` function
(https://gohugo.io/functions/hugo/ismultilingual/) can be used to test if there
is more than one configured language. If not, we just skip including the
language selection partial layout. It can mistakenly appear for mono-lingual
sites/content because it is always included, and the `lang.html` partial layout
seems to iterate through the entire range of configured languages, even when
it's only one language.

Requires Hugo v0.124.0 or newer.
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