Files
klz-cables.com/.pnpm-store/v10/files/bd/4cd549688970c4ffff7e7148a7339dc7df97d630922dae9f621c5e3b30ee47275c182bf7452b6777ba4edfe36ba1124a235590b604cdc632faf4e95f7ba454
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

36 lines
1.7 KiB
Plaintext

import type { IntlConfig, Locale } from 'use-intl/core';
export type RequestConfig = Omit<IntlConfig, 'locale'> & {
/**
* @see https://next-intl.dev/docs/usage/configuration#i18n-request
**/
locale: IntlConfig['locale'];
};
export type GetRequestConfigParams = {
/**
* If you provide an explicit locale to an async server-side function like
* `getTranslations({locale: 'en'})`, it will be passed via `locale` to
* `getRequestConfig` so you can use it instead of the segment value.
*/
locale?: Locale;
/**
* Typically corresponds to the `[locale]` segment that was matched by the middleware.
*
* However, there are three special cases to consider:
* 1. **Overrides**: When an explicit `locale` is passed to awaitable functions
* like `getTranslations({locale: 'en'})`, then this value will be used
* instead of the segment.
* 2. **`undefined`**: The value can be `undefined` when a page outside of the
* `[locale]` segment renders (e.g. a language selection page at `app/page.tsx`).
* 3. **Invalid values**: Since the `[locale]` segment effectively acts like a
* catch-all for unknown routes (e.g. `/unknown.txt`), invalid values should
* be replaced with a valid locale.
*
* @see https://next-intl.dev/docs/usage/configuration#i18n-request
*/
requestLocale: Promise<string | undefined>;
};
/**
* Should be called in `i18n/request.ts` to create the configuration for the current request.
*/
export default function getRequestConfig(createRequestConfig: (params: GetRequestConfigParams) => RequestConfig | Promise<RequestConfig>): (params: GetRequestConfigParams) => RequestConfig | Promise<RequestConfig>;