-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
[i18n] allow translating docsearch labels #1381
Comments
Well currently at the initial render, we display placeholder that mimics Algolia search button, and when user clicks on the button, Algolia will render its button. So, we should pass in those VitePress config to Algolia I guess 👀 For (2), the |
@Zogsha Regarding (2), you can configure it like this: |
Could the rest apis supported? Like resultsFooterComponent or transformSearchClient |
@fake-car I haven't tested those, but IG that would break the app as the resultant site data after that won't be serializable. You can however register a custom component in one of the available navbar slots if you want better customization. |
@brc-dd Thanks a lot, I will give it a try. |
Discussed in #1368
Originally posted by Zogsha September 19, 2022
Hi, thanks for your work on vitepress!
My documentation site is written in French, so I need the Docsearch component in French.
I have two problems :
There is a
algolia.buttonText
option inthemeConfig
. I set it to "Rechercher" instead of the default "Search", but whenever I click on the search component or use "CTRL+K", the placeholder turns back to "Search". It only displays "Rechercher" when the page refreshes. I only tested in dev.In the Docsearch API Reference, there is
translations
option (https://docsearch.algolia.com/docs/api#translations). I can't figure out how to configure it.I think 1. is not intended, but I didn't look further. Is 2. intended ? If that is the case, do you plan to let us translate the Doscsearch modal via
algolia
config inthemeConfig
?Thanks,
Aliosha
The text was updated successfully, but these errors were encountered: