import type { RemixI18n } from "./types.js"; /** i18next resource format: `{ locale: { namespace: { key: value } } }` */ type I18nextResources = Record>>; interface BuildI18nextConfigOptions { i18n: RemixI18n; /** Additional i18next init options (merged with defaults) */ i18nextOptions?: Record; } /** * Creates i18next-compatible resources from CDN translations. * * Converts Better i18n CDN format: `{ "namespace": { "key": "value" } }` * To i18next resources format: `{ "en": { "namespace": { "key": "value" } } }` * * @param i18n - RemixI18n instance from `createRemixI18n()` * @param locales - Optional locale list (defaults to all locales from CDN manifest) */ export declare function loadResources(i18n: RemixI18n, locales?: string[]): Promise; /** * Builds the config object to pass into `createI18nextMiddleware()`. * Fetches CDN translations + manifest, returns i18next-ready config. * * @example * ```ts * import { createRemixI18n } from "@better-i18n/remix"; * import { buildI18nextConfig } from "@better-i18n/remix/i18next"; * import { createI18nextMiddleware } from "remix-i18next/middleware"; * * const i18n = createRemixI18n({ project: "acme/store", defaultLocale: "en" }); * const config = await buildI18nextConfig({ i18n }); * * export const [i18nextMiddleware, getLocale, getInstance] = * createI18nextMiddleware({ * detection: { * supportedLanguages: config.supportedLanguages, * fallbackLanguage: config.fallbackLanguage, * }, * i18next: { * resources: config.resources, * ...config.i18nextOptions, * }, * }); * ``` */ export declare function buildI18nextConfig(options: BuildI18nextConfigOptions): Promise<{ resources: I18nextResources; supportedLanguages: string[]; fallbackLanguage: string; languages: import("@better-i18n/core").LanguageOption[]; i18nextOptions: { lowerCaseLng: boolean; defaultNS: string; fallbackNS: string; interpolation: { escapeValue: boolean; }; }; }>; export {}; //# sourceMappingURL=i18next.d.ts.map