Files
klz-cables.com/.pnpm-store/v10/files/39/a21e40b8076b6f4812618f01e529cd8031171db5cc953f09be7bffb5c9d26f34162c2d70bcc13fabd4f52bb6e0ce772c99a59248356805a0f91a1337dc65a5
Marc Mintel 5397309103
Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 20s
Build & Deploy / 🧪 QA (push) Failing after 34s
Build & Deploy / 🏗️ Build (push) Has started running
Build & Deploy / 🚀 Deploy (push) Has been cancelled
Build & Deploy / 🧪 Smoke Test (push) Has been cancelled
Build & Deploy / ⚡ Lighthouse (push) Has been cancelled
Build & Deploy / 🔔 Notify (push) Has been cancelled
fix(products): fix breadcrumbs and product filtering (backport from main)
2026-02-24 16:04:21 +01:00

22 lines
698 B
Plaintext

import { initI18n } from '@payloadcms/translations';
import { cookies, headers } from 'next/headers.js';
import { getRequestLanguage } from 'payload';
/**
* In the context of Next.js, this function initializes the i18n object for the current request.
*
* It must be called on the server side, and within the lifecycle of a request since it relies on the request headers and cookies.
*/
export const getNextRequestI18n = async ({
config
}) => {
return await initI18n({
config: config.i18n,
context: 'client',
language: getRequestLanguage({
config,
cookies: await cookies(),
headers: await headers()
})
});
};
//# sourceMappingURL=getNextRequestI18n.js.map