import { type ContextPlugin } from "@nifrajs/core/server"; export interface LanguageMatch { readonly language: string; readonly matched: "exact" | "base" | "wildcard" | "default"; } export interface LanguageOptions { readonly supported: L; readonly defaultLanguage: L[number]; /** Emit `Content-Language`. Default `true`. */ readonly header?: boolean; } /** * Pick the best supported language for an `Accept-Language` header. Exact tags win, then compatible * base-language matches, then `*`, then the configured default. */ export declare function pickLanguage(header: string | null, supported: L, defaultLanguage: L[number]): LanguageMatch; /** * Derives `c.language` from `Accept-Language` and emits `Content-Language` by default. * * Header-only by design. For the full detector - `?lang=` query parameter → cookie → * `Accept-Language`, with optional cookie persistence - use `localeDetector()` from * `@nifrajs/i18n/detector`; use one or the other, not both. */ export declare function language(options: LanguageOptions): ContextPlugin<{ language: L[number]; languageMatch: LanguageMatch; }>; //# sourceMappingURL=language.d.ts.map