UNPKG

@shelchin/svelte-i18n

Version:

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

37 lines (36 loc) 1.04 kB
/** * Language search utilities * THIS IS THE SINGLE SOURCE OF TRUTH for all language codes in the library */ export interface LanguageInfo { code: string; name: string; englishName: string; direction: 'ltr' | 'rtl'; flag: string; } /** * Comprehensive language metadata * This is the authoritative source for all language codes in the library * Other modules should import and use this data * * Covers all UN member states and recognized regions */ export declare const commonLanguages: LanguageInfo[]; /** * Search for languages by query string * Matches against code, native name, or English name */ export declare function fuzzySearchLanguages(query: string): LanguageInfo[]; /** * Get language info by code */ export declare function getLanguageInfo(code: string): LanguageInfo | undefined; /** * Get all supported languages */ export declare function getAllLanguages(): LanguageInfo[]; /** * Check if a language code is valid */ export declare function isValidLanguageCode(code: string): boolean;