-
Notifications
You must be signed in to change notification settings - Fork 390
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
A question about i18n configuration #599
Comments
You should rely on the content of your pages instead of relying on the URL. You can either:
You will need to update your JS snippet as following: docsearch({
apiKey: '21cdc123c620ec4bb81259c32e90c08f',
indexName: 'veui',
inputSelector: '### REPLACE ME ####',
algoliaOptions: { 'facetFilters': ["lang:$LANG"] },
debug: false // Set debug to true if you want to inspect the dropdown
});
'facetFilters': ["lang:en-US"] |
Thanks! I have a further question: how can I properly re-initialize the docsearch after it's initialized? My site is using a front-end router so that I need to switch language at runtime. |
Your index will be updated every 24H. You will need to wait for the next crawl to be able to update your front. You can run our crawler on your own if you want more control. You will need you own algolia account |
I mean the |
Is your issue related to your own DocSearch implementation?
It's a general usage question. I saw in the docs that we can configure certain part in URL to match language/version facets. But what if I have a default language like this:
And the following config should help docsearch to recognize language facets like
fr
andjp
:My question is, in this case, how can I configure for the default language (
en
) so that on English pages docsearch only return those results not matching any language facets? Thanks in advance.The text was updated successfully, but these errors were encountered: