diff --git a/.changeset/tender-mangos-pay.md b/.changeset/tender-mangos-pay.md new file mode 100644 index 000000000..c240cd32c --- /dev/null +++ b/.changeset/tender-mangos-pay.md @@ -0,0 +1,5 @@ +--- +'fumadocs-core': patch +--- + +Revert default i18n config diff --git a/packages/core/src/search/orama/create-i18n.ts b/packages/core/src/search/orama/create-i18n.ts index a4771c91a..c98cf32f1 100644 --- a/packages/core/src/search/orama/create-i18n.ts +++ b/packages/core/src/search/orama/create-i18n.ts @@ -40,24 +40,9 @@ type WithLocale = T & { async function getTokenizer( locale: string, ): Promise<{ language: string } | { tokenizer: Tokenizer }> { - const mandarin = ['cn', 'zh']; - const language = - Object.keys(STEMMERS).find((lang) => STEMMERS[lang] === locale) ?? locale; - - if ( - mandarin.some((code) => locale === code || locale.startsWith(`${code}-`)) - ) { - const { createTokenizer } = await import( - '@orama/tokenizers/mandarin' as string - ); - - return { - tokenizer: await createTokenizer(), - }; - } - return { - language, + language: + Object.keys(STEMMERS).find((lang) => STEMMERS[lang] === locale) ?? locale, }; }