Skip to content

[i18n] allow translating docsearch labels #1381

Closed
@brc-dd

Description

@brc-dd

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 :

  1. There is a algolia.buttonText option in themeConfig. 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.

  2. 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 in themeConfig?

Thanks,
Aliosha

Metadata

Metadata

Assignees

No one assigned

    Labels

    themeRelated to the theme

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions