import en from './en-us.js'; type PickStartsWith = T extends `${Prefix}${string}` ? T : never; type DeepPartial = T extends object ? { [P in keyof T]?: DeepPartial; } : T; export type Translation = typeof en; export type PartialTranslation = { $lang: string; $name?: string; $dir?: 'ltr' | 'rtl'; } & DeepPartial>; export type WellKnownKeys = PickStartsWith; /** * Removes all registered translations */ export declare function clearTranslations(): void; /** * Registers one or more translations. If a translation for the same language * already exists, the new translation will be deep-merged with the existing one. * Translations can be partial — only the fields you provide will override existing values. */ export declare function registerTranslation(...translation: (Translation | PartialTranslation)[]): void; /** * subscribe to document language changes * @param onChange callback for when document `lang` attr changes * @returns cleanup function */ export declare function subscribeToDocumentLang(onChange: () => void): () => void; /** * subscribe to translation registration changes * @param onChange callback for when new translations are registered * @returns cleanup function */ export declare function subscribeToTranslationRegistration(onChange: () => void): () => void; /** * Check whether there is a translation registered for the given lang * @param lang the lang code e.g. "en" or "en-GB" */ export declare function isTranslationRegistered(lang: string): boolean; /** * Picks the most appropriate translation for the given language, from most specific to least specific. * First tries lang + region, then lang only, then fallback. */ export declare function resolveTranslation(langCode: string): { $lang: string; $name: string; $dir: "ltr" | "rtl"; 'nord-command-menu': { instructions: string; inputLabel: string; footerArrowKeys: string; footerEnterKey: string; footerEscapeKey: string; footerBackspaceKey: string; noResults: (searchTerm: string) => string; tip: string; placeholder: string; }; 'nord-calendar': { prevMonthLabel: string; nextMonthLabel: string; monthSelectLabel: string; yearSelectLabel: string; }; 'nord-date-picker': { modalHeading: string; closeLabel: string; buttonLabel: string; selectedDateMessage: string; dateOutOfMinBound: (minDate: string) => string; dateOutOfMaxBound: (maxDate: string) => string; }; 'nord-modal': { closeLabel: string; }; 'nord-nav-toggle': { label: string; }; 'nord-textarea': { remainingCharacters: (remainder: number) => string; }; 'nord-notification': { dismissLabel: string; }; 'nord-message': { unreadLabel: string; }; 'nord-tag': { removeLabel: string; }; }; export { en as fallback };