import { en } from './en.js'; import { es } from './es.js'; import { DEFAULT_LOCALE, LOCALES } from './types.js'; import type { CoreMessages, Locale } from './types.js'; /** Message catalogue for a locale. */ export declare function getMessages(locale?: Locale): CoreMessages; /** Whether a string is a locale Trazum ships. */ export declare function isLocale(value: unknown): value is Locale; /** * Highest-priority locale in `input` that Trazum actually ships, or `null` * when it lists none. * * Accepts a bare tag (`es`), a regional tag (`es-ES`, `en_GB`), a POSIX locale * string (`es_ES.UTF-8`) or an Accept-Language list, so the same helper works * for an HTTP header, a CLI flag and the LANG environment variable. * * The whole list is walked rather than just the first entry: a browser sending * `fr-FR,es;q=0.9` prefers French, which we do not have, but it does read * Spanish, which we do — falling straight back to English would ignore a * preference the user actually expressed. Quality values are assumed to be in * descending order, as every real client sends them. * * Returning `null` instead of a default is what lets callers tell "asked for * something we don't have" from "asked for English", and so fall through to * the next configuration source. */ export declare function matchLocale(input: string | null | undefined): Locale | null; /** * Same as `matchLocale`, but falls back to the default locale rather than * returning `null`: a bad locale should never be the reason an optimisation * fails. */ export declare function resolveLocale(input: string | null | undefined): Locale; export { DEFAULT_LOCALE, LOCALES, en, es }; export type { BelowCacheMinimumParams, CachePrefixReorderParams, ContextOverflowParams, CoreMessages, Locale, LocalizedMessage, ModelDowngradeParams, OutputDominatedParams, PromoPricingParams, PromptCachingParams, RuleCopy, RuleId, } from './types.js'; //# sourceMappingURL=index.d.ts.map