import { EventBus } from '../core/EventBus';
/** Supported locale codes */
export type Locale = 'pl' | 'en' | 'de' | 'fr' | 'es' | 'it' | 'pt' | 'nl' | 'sv' | 'no' | 'da' | 'fi' | 'cs' | 'sk' | 'hu' | 'ro' | 'bg' | 'uk' | 'ja' | 'ko';
/** All supported locales as array */
export declare const SUPPORTED_LOCALES: readonly Locale[];
/** Human-readable locale names */
export declare const LOCALE_NAMES: Record<Locale, string>;
/** RTL locales (none currently, but extensible for ar, he) */
export declare const RTL_LOCALES: ReadonlySet<string>;
/** Nested translation dictionary */
export interface TranslationDict {
    [key: string]: string | TranslationDict;
}
/** Translation namespace = module-specific translations */
export interface TranslationNamespace {
    locale: Locale;
    namespace: string;
    translations: TranslationDict;
}
/** Interpolation values */
export interface InterpolationValues {
    [key: string]: string | number | boolean;
}
/** Pluralization rules per language family */
export type PluralCategory = 'zero' | 'one' | 'two' | 'few' | 'many' | 'other';
export interface PluralRule {
    select(count: number): PluralCategory;
}
/** Config for I18nManager */
export interface I18nConfig {
    defaultLocale: Locale;
    fallbackLocale: Locale;
    debug: boolean;
    missingKeyHandler?: (locale: Locale, ns: string, key: string) => string;
    interpolationPrefix: string;
    interpolationSuffix: string;
    pluralSeparator: string;
    namespaceSeparator: string;
    keySeparator: string;
}
export declare class I18nManager {
    private locale;
    private readonly config;
    private readonly namespaces;
    private readonly loadedNamespaces;
    readonly events: EventBus;
    constructor(config?: Partial<I18nConfig>);
    getLocale(): Locale;
    setLocale(locale: Locale): void;
    isRTL(): boolean;
    /** Auto-detect locale from browser settings */
    detectLocale(): Locale;
    /**
     * Add translations for a namespace + locale.
     * Can be called multiple times (merges).
     */
    addTranslations(namespace: string, locale: Locale, translations: TranslationDict): void;
    /** Check if translations are loaded for namespace + locale */
    isLoaded(namespace: string, locale?: Locale): boolean;
    /** Load translations from async source (e.g., dynamic import) */
    loadNamespace(namespace: string, locale: Locale, loader: () => Promise<TranslationDict>): Promise<void>;
    /**
     * Translate a key.
     *
     * @param fullKey - Key with optional namespace: 'ns:path.to.key' or just 'path.to.key'
     * @param values - Interpolation values (including `count` for pluralization)
     * @returns Translated string or fallback
     *
     * @example
     * i18n.t('editor:tools.select') // → 'Select'
     * i18n.t('game:score', { score: 100 }) // → 'Score: 100'
     * i18n.t('items', { count: 5 }) // → '5 items' (pluralized)
     */
    t(fullKey: string, values?: InterpolationValues): string;
    /** Get plural category for current locale */
    getPluralCategory(count: number): PluralCategory;
    /** Format number using locale conventions */
    formatNumber(value: number, options?: Intl.NumberFormatOptions): string;
    /** Format date using locale conventions */
    formatDate(date: Date, options?: Intl.DateTimeFormatOptions): string;
    /** Format relative time (e.g., "2 days ago") — requires ES2020+ runtime */
    formatRelativeTime(value: number, unit: string): string;
    private parseKey;
    private resolve;
    private interpolate;
    /** Get all loaded namespaces */
    getLoadedNamespaces(): string[];
    /** Get all translations for a namespace + locale (for debugging) */
    getTranslations(namespace: string, locale?: Locale): TranslationDict | undefined;
    /** Get count of missing translations for a locale compared to fallback */
    getMissingKeys(namespace: string, locale: Locale): string[];
    dispose(): void;
}
/** Get or create the default I18nManager instance */
export declare function getI18n(): I18nManager;
/** Initialize the default I18nManager with config */
export declare function initI18n(config?: Partial<I18nConfig>): I18nManager;
/** Convenience shorthand for getI18n().t() */
export declare function t(key: string, values?: InterpolationValues): string;
/** Core engine UI strings in English */
export declare const ENGINE_TRANSLATIONS_EN: TranslationDict;
/** Core engine UI strings in Polish */
export declare const ENGINE_TRANSLATIONS_PL: TranslationDict;
/** Core engine UI strings in German */
export declare const ENGINE_TRANSLATIONS_DE: TranslationDict;
/** Register built-in translations on an I18nManager instance */
export declare function registerEngineTranslations(i18n: I18nManager): void;
