@shelchin/svelte-i18n
Version:
The last Svelte i18n library you'll ever need. Type-safe, AI-powered, zero-config.
36 lines (35 loc) • 1.06 kB
TypeScript
import type { I18nConfig } from './types.js';
/**
* Global configuration manager for i18n
* Allows packages to inherit configuration from the main app
*/
declare class ConfigManager {
private configs;
private mainConfig;
/**
* Register a configuration
* @param namespace - The namespace (use 'app' for main application)
* @param config - The i18n configuration
* @param isMain - Whether this is the main app configuration
*/
register(namespace: string, config: I18nConfig, isMain?: boolean): void;
/**
* Get configuration for a namespace
* Packages will inherit from main app config if available
*/
getConfig(namespace: string): I18nConfig | null;
/**
* Get the main app configuration
*/
getMainConfig(): I18nConfig | null;
/**
* Check if a namespace is registered
*/
has(namespace: string): boolean;
/**
* Clear all configurations (useful for testing)
*/
clear(): void;
}
export declare const configManager: ConfigManager;
export {};