This commit is contained in:
hailin 2025-04-17 11:13:32 +08:00
parent 7075192f9a
commit 92fae96d41
1 changed files with 1 additions and 1 deletions

View File

@ -33,7 +33,7 @@ export function LanguageSwitcher() {
const segments = pathname.split('/') const segments = pathname.split('/')
// 如果路径前缀是语言码,则替换 // 如果路径前缀是语言码,则替换
const isLocaleInPath = (i18nConfig.locales as string[]).includes(segments[1]) onst isLocaleInPath = (i18nConfig.locales as unknown as string[]).includes(segments[1])
if (isLocaleInPath) { if (isLocaleInPath) {
segments[1] = newLocale segments[1] = newLocale
} else { } else {