Skip to content
This repository has been archived by the owner on Nov 26, 2022. It is now read-only.

Chinese language support #117

Closed
yangxuan74 opened this issue May 19, 2021 · 7 comments
Closed

Chinese language support #117

yangxuan74 opened this issue May 19, 2021 · 7 comments
Labels
good first issue Good for newcomers help wanted Extra attention is needed upstream

Comments

@yangxuan74
Copy link

Does Lunr support Chinese search? If not, how can I make it support?

@ggrossetie ggrossetie changed the title Language support Chinese language support May 19, 2021
@ggrossetie
Copy link
Owner

Hello @yangxuan74

We are using https://github.com/MihaiValentin/lunr-languages to provide support for other languages. Unfortunately, lunr-languages does not support Chinese but you can contribute a new language: https://github.com/MihaiValentin/lunr-languages/blob/master/CONTRIBUTING.md

@yangxuan74
Copy link
Author

I found lunr that supports Chinese https://github.com/darkyzhou/lunr-languages-zh, but how does it add toantora-site-generator-lunr?

@ggrossetie
Copy link
Owner

Unfortunately, darkyzhou/lunr-languages-zh is a complete fork of lunr-languages so I'm a bit unsure...

I guess it would be nice if each language was distributed as a standalone npm package. Then, we could implement a logic to load additional/optional languages.

@darkyzhou What do you think about this idea?

@darkyzhou
Copy link

Unfortunately, darkyzhou/lunr-languages-zh is a complete fork of lunr-languages so I'm a bit unsure...

I guess it would be nice if each language was distributed as a standalone npm package. Then, we could implement a logic to load additional/optional languages.

@darkyzhou What do you think about this idea?

I think it's a nice idea. :)

Since the authors of both lunr-languages and lunr.zh.js are still inactive on GitHub. One can just copy lunr.zh.js's content from the PR and publish it as an individual npm package.

@darkyzhou
Copy link

darkyzhou commented Jun 18, 2021

holy moly, MihaiValentin is back and that PR is merged.

now lunr-languages v1.5.0 natively supports Chinese!

@Mogztter @yangxuan74

@yangxuan74
Copy link
Author

Thank you for bringing this to my attention.That's good news.

@ggrossetie
Copy link
Owner

holy moly, MihaiValentin is back and that PR is merged.
now lunr-languages v1.5.0 natively supports Chinese!

Awesome news!

Thank you for bringing this to my attention.That's good news.

👍🏻
Feel free to submit a pull request to upgrade to the latest version https://github.com/MihaiValentin/lunr-languages/releases/tag/1.7.0

@ggrossetie ggrossetie added good first issue Good for newcomers help wanted Extra attention is needed labels Jun 19, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
good first issue Good for newcomers help wanted Extra attention is needed upstream
Projects
None yet
Development

No branches or pull requests

3 participants