@shelchin/svelte-i18n
Version:
The last Svelte i18n library you'll ever need. Type-safe, AI-powered, zero-config.
20 lines (19 loc) • 772 B
TypeScript
/**
* Server-side loader for auto-discovered translations
* This allows SSR to use auto-discovered languages from static files
*/
import type { I18nInstance } from '../core/types.js';
/**
* Load translations from the file system during SSR
* This is synchronous and only works on the server
*/
export declare function loadServerTranslations(i18n: I18nInstance, locale: string, namespace?: string): boolean;
/**
* Check if a locale is available in auto-discovered translations
*/
export declare function isAutoDiscoveredLocale(locale: string, namespace?: string): boolean;
/**
* Load all auto-discovered locales on the server
* This ensures SSR has access to all languages
*/
export declare function loadAllServerTranslations(i18n: I18nInstance): Promise<void>;