This commit is contained in:
hailin 2025-04-18 10:23:17 +08:00
parent a1ec617c9d
commit 60ca9d8bd3
1 changed files with 2 additions and 3 deletions

View File

@ -25,9 +25,8 @@ export default async function Login({
}) {
const cookieStore = cookies()
// locale 已经是一个字符串,不需要解构
const localeString = locale;
// 优先从 cookie 获取 locale否则使用 URL 参数中的 locale
const localeString = cookieStore.get('locale')?.value || locale;
const { t, resources } = await initTranslations(localeString, ['translation']);
// 打印翻译内容确认是否正常加载