This commit is contained in:
tangly1024
2025-04-11 18:14:49 +08:00
parent 76aa385be7
commit 99ba183f56
3 changed files with 6 additions and 14 deletions

View File

@@ -121,14 +121,4 @@ export const redirectUserLang = (lang, pageId) => {
}
}
}
}
/**
* 获取当前 Next.js 路由下的 locale
* @returns 当前路由下的 locale
*/
export function getCurrentLang() {
const router = useRouter()
let currentLang = router.locale
return currentLang
}
}