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

When a multiple languages are enabled, the displayName shows the current language name/icon (twice). #565

Closed
jpanther opened this issue May 27, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@jpanther
Copy link
Owner

#560 may have introduced a bug in multilingual sites in pre and post 0.112 hugo.

Summary

When a multiple languages are enabled, the displayName shows the current language name/icon (twice).
The links are correct, and when clicking on the second language, both displayName name/icon switches to this name/icon (twice)

Expected behaviour:

When multiple languages are enabled, the displayName should display both language options, eg:

EN | DE (linking to ***.com and ***.de)

Actual behaviour:

When multiple languages are enabled, the displayName actually displays both language options with the same name, eg:

EN | EN (linking to ***.com and ***.de)

Clicking on the second EN option here, goes to the correct DE URL, and now both names are DE.

DE | DE (linking to ***.com and ***.de)


While you are looking at this, can I add a feature request?

Rather than displaying both (or all) language names, can it either:

  • Display a single drop down icon, to toggle between available languages
  • If only two languages are available, display the non-active displayName to toggle between them.

This may make the header look a little less cluttered for some websites :)

Thanks for your awesome work!

Originally posted by @BenAlexanderAU in #560 (comment)

@jpanther jpanther added the bug Something isn't working label May 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant