UNPKG

@shelchin/svelte-i18n

Version:

The last Svelte i18n library you'll ever need. Type-safe, AI-powered, zero-config.

28 lines (27 loc) 2.58 kB
/** * Main export file for svelte-i18n with type safety * When the app generates types, this will provide full type safety */ import { getI18n as getOriginalI18n, setupI18n as setupOriginalI18n } from './core/store.svelte.js'; export { type I18nStore } from './core/store.svelte.js'; export declare const getI18n: typeof getOriginalI18n; export declare const setupI18n: typeof setupOriginalI18n; export type { I18nInstance } from './core/types.js'; export type { I18nConfig, TranslationSchema, TranslationFile, LanguageMeta, InterpolationParams, PathKeys, TypedTranslationFunction, ExtractKeys } from './core/types.js'; export { saveLocale, loadSavedLocale, clearSavedLocale, getInitialLocale } from './services/persistence.js'; export { validateSchema, detectBrowserLanguage, mergeTranslations } from './utils/translation-utils.js'; export { getAppBasePath, buildAssetUrl } from './utils/base-path.js'; export { loadI18nSSR, i18nServerLoad } from './kit/ssr-load.js'; export { loadI18nUniversal, i18nUniversalLoad } from './kit/universal-load.js'; export { setupI18nClient, initI18nOnMount, i18nIsReady, i18nClientInit } from './kit/client-init.js'; export { autoDiscoverTranslations, loadAutoDiscoveryConfig, getCachedAutoDiscoveryConfig, type AutoDiscoveryConfig, type AutoDiscoveryOptions } from './services/discovery.js'; export { getAppSupportedLanguages, isAppLanguageSupported } from './utils/app-languages.js'; export { fuzzySearchLanguages, getLanguageInfo, getAllLanguages, type LanguageInfo } from './utils/language-search.js'; export { formatNumber, formatCurrency, formatDate, formatTime, formatRelativeTime, formatList, FORMATS } from './core/formatter.js'; export { default as LanguageSwitcher } from './components/LanguageSwitcher.svelte'; export { default as ValidationPopup } from './components/ValidationPopup.svelte'; export { registerBuiltInTranslations, loadBuiltInTranslations, registerPackageTranslations, type TranslationRegistry } from './services/built-in-loader.js'; export { getAvailableLocales, getTranslation, getMergedTranslations, isLocaleAvailable, getNamespaces, getNamespaceLocales } from './utils/registry-utils.js'; export { createI18n, getI18nInstance, initI18n, type UnifiedI18nConfig, type TypedI18nInstance, type I18n, createTypedUnifiedI18n, getTypedUnifiedI18n, initTypedI18n, type TypedUnifiedI18nInstance } from './unified.js'; export { deLocalizeUrl } from './kit/url-locale.js'; export { extractLocaleFromPathname, extractSupportedLocaleFromPathname, getBestLocale, shouldUsePathnameLocale } from './kit/pathname-locale.js';