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

i18n support #26

Open
jleknes opened this issue Aug 2, 2022 · 0 comments
Open

i18n support #26

jleknes opened this issue Aug 2, 2022 · 0 comments

Comments

@jleknes
Copy link
Contributor

jleknes commented Aug 2, 2022

In our project we both use document level and field level internationalisation, however we mostly use field level. Currently we support two languages, but in the future there we might support several. We use Algolia for search, and because all content is translated the best way for us is to use multiple indices, one for each language. https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/multilingual-search/

This means that one document in Sanity should be indexed as several records in Algolia, one for each language. Different projections of the same document should be sufficient to build the individual records.

Example:

projection: `{
"title": title["${locale}"],
"path": slug.current,
"summary": summary["${locale}"]}`

I tried to solve this by creating two instances of indexer (one for each language) and trigger webhookSync successively for each of them. This did not work.

I guess an option is to create two webhooks and have one for each language? Are there any other workarounds?

Will this be resolved by PR #14? If so, it might be a good idea to use i18n as a use case for documentation. I believe that I might not be the only one struggling with this.

@jleknes jleknes changed the title I18n support i18n support Aug 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant