-
-
Notifications
You must be signed in to change notification settings - Fork 8.5k
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
html sidebar item should be translatable #9575
Comments
I'll consider it as a duplicate of #4542 Suggested workaround, not an ideal api but will work to translate html navbar items: #4542 (comment) |
Hi @slorber, can this also be used directly in the sidebar.js or are there limitations in this regard? Would you mind explaining in a little more detail how this can be implemented? I followed the following approach:
The sidebar title "ENGLISH SIDEBAR TITLE" (default value) is displayed without any issues. However, the default value is also displayed for the "de" case of the German version. Am I missing something? My knowledge in this matter is rather limited, so I am grateful for any tips! :) |
Hi @slorber, we don't start the docs using a locale arg at all -- we use As far as i could tell the sidebar code only gets run once when the en locale is generated, this doesn't seem to happen again for the |
Runnable proof that it does after running Please create a minimal repro next time |
Thank you, it seems our issue was that instead of |
Have you read the Contributing Guidelines on issues?
Prerequisites
npm run clear
oryarn clear
command.rm -rf node_modules yarn.lock package-lock.json
and re-installing packages.Description
Docusaurus offers the possibility to add a "sidebar-title" using the HTML type. However, there is currently no option for a simple translation.
The function itself works again with the latest Canary version, but it can only be used in one language and is limited if you offer docs in several languages.
Reproducible demo
No response
Steps to reproduce
Add the sidebar-title, build it and check it. It's only available in the hardcoded language or rather the value that is set.
Expected behavior
The sidebar-title should be available in other languages as well, so there should be some sort of support for this.
Actual behavior
The sidebar-title (value) is hardcoded and therefore the same for all languages.
Your environment
Self-service
The text was updated successfully, but these errors were encountered: