This commit is contained in:
parent
a1ec617c9d
commit
60ca9d8bd3
|
|
@ -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']);
|
||||
// 打印翻译内容确认是否正常加载
|
||||
|
|
|
|||
Loading…
Reference in New Issue