/** * Internationalization (i18n) Types * Type definitions for multi-language support */ /** * Supported locales */ export declare enum Locale { EN_US = "en-US", EN_GB = "en-GB", ES_ES = "es-ES", FR_FR = "fr-FR", DE_DE = "de-DE", IT_IT = "it-IT", PT_BR = "pt-BR", JA_JP = "ja-JP", ZH_CN = "zh-CN", KO_KR = "ko-KR", RU_RU = "ru-RU", AR_SA = "ar-SA", HI_IN = "hi-IN" } /** * Translation key categories */ export declare enum TranslationCategory { ERRORS = "errors", MESSAGES = "messages", UI = "ui", VALIDATION = "validation", NOTIFICATIONS = "notifications", HELP = "help" } /** * Pluralization rules */ export declare enum PluralForm { ZERO = "zero", ONE = "one", TWO = "two", FEW = "few", MANY = "many", OTHER = "other" } /** * Translation entry */ export interface Translation { key: string; category: TranslationCategory; locale: Locale; value: string | Record; description?: string; placeholders?: Record; metadata?: { lastUpdated?: Date; translator?: string; verified?: boolean; }; } /** * Translation bundle for a locale */ export interface TranslationBundle { locale: Locale; translations: Record>; metadata?: { version?: string; created?: Date; updated?: Date; completeness?: number; }; } /** * i18n configuration */ export interface I18nConfig { defaultLocale: Locale; fallbackLocale?: Locale; supportedLocales: Locale[]; autoDetect?: boolean; loadStrategy?: 'eager' | 'lazy'; interpolation?: { prefix?: string; suffix?: string; escapeValue?: boolean; }; pluralization?: { enabled: boolean; rules?: Partial PluralForm>>; }; missingKeyStrategy?: 'show-key' | 'empty' | 'fallback' | 'error'; cache?: { enabled: boolean; ttl?: number; }; } /** * Translation context for variable interpolation */ export interface TranslationContext { [key: string]: string | number | boolean | Date; } /** * Formatted message */ export interface FormattedMessage { key: string; locale: Locale; message: string; variables?: TranslationContext; } /** * Translation statistics */ export interface TranslationStats { locale: Locale; totalKeys: number; translatedKeys: number; missingKeys: number; completeness: number; categories: Record; } /** * Date/Time formatting options */ export interface DateTimeFormatOptions { locale?: Locale; dateStyle?: 'full' | 'long' | 'medium' | 'short'; timeStyle?: 'full' | 'long' | 'medium' | 'short'; weekday?: 'long' | 'short' | 'narrow'; year?: 'numeric' | '2-digit'; month?: 'numeric' | '2-digit' | 'long' | 'short' | 'narrow'; day?: 'numeric' | '2-digit'; hour?: 'numeric' | '2-digit'; minute?: 'numeric' | '2-digit'; second?: 'numeric' | '2-digit'; timeZone?: string; hour12?: boolean; } /** * Number formatting options */ export interface NumberFormatOptions { locale?: Locale; style?: 'decimal' | 'currency' | 'percent' | 'unit'; currency?: string; currencyDisplay?: 'symbol' | 'code' | 'name'; minimumFractionDigits?: number; maximumFractionDigits?: number; minimumIntegerDigits?: number; useGrouping?: boolean; unit?: string; } /** * List formatting options */ export interface ListFormatOptions { locale?: Locale; type?: 'conjunction' | 'disjunction' | 'unit'; style?: 'long' | 'short' | 'narrow'; } /** * Relative time formatting options */ export interface RelativeTimeFormatOptions { locale?: Locale; numeric?: 'always' | 'auto'; style?: 'long' | 'short' | 'narrow'; } /** * Translation export format */ export interface TranslationExport { format: 'json' | 'yaml' | 'po' | 'xliff' | 'csv'; locale?: Locale; category?: TranslationCategory; includeMetadata?: boolean; } /** * Translation import result */ export interface TranslationImportResult { locale: Locale; imported: number; updated: number; skipped: number; errors: Array<{ key: string; message: string; }>; } //# sourceMappingURL=types.d.ts.map