@shelchin/svelte-i18n
Version:
The last Svelte i18n library you'll ever need. Type-safe, AI-powered, zero-config.
20 lines (19 loc) • 813 B
TypeScript
/**
* Helper functions to determine which languages the app supports
* This combines built-in languages with auto-discovered app languages
*/
import type { I18nInstance } from '../core/types.js';
/**
* Get all languages that the app supports (for language switching)
* This includes:
* 1. Built-in app languages (from the main app instance)
* 2. Auto-discovered app languages (from index.json)
*
* This explicitly excludes package languages as packages should follow
* the app's language selection.
*/
export declare function getAppSupportedLanguages(i18n: I18nInstance, translationsPath?: string): Promise<string[]>;
/**
* Check if a language is supported by the app
*/
export declare function isAppLanguageSupported(i18n: I18nInstance, locale: string, translationsPath?: string): Promise<boolean>;