UNPKG

kawkab-frontend

Version:

Kawkab frontend is a frontend library for the Kawkab framework

28 lines (27 loc) 1.4 kB
export declare function onLanguageChange(callback: (lng: string) => void): () => void; export declare function initI18n(resources: any, defaultLang?: string, currentLang?: string, cookieHeader?: string): import("i18next").i18n; export declare function changeLanguage(lng: string): Promise<any>; export declare function getCurrentLanguage(): string; export declare function detectLanguageFromCookies(cookieHeader?: string): string; export declare function initLanguageFromRequest(resources: any, defaultLang?: string, request?: { headers?: { cookie?: string; 'accept-language'?: string; }; }): string; export declare function detectLanguageFromHeader(acceptLanguage?: string): string; export declare function getLanguageDirection(language: string): 'rtl' | 'ltr'; export declare function setCurrentLanguage(lng: string): void; export declare function hydrateLanguage(callback?: () => void): void; export declare function getI18nInstance(): import("i18next").i18n; export declare function translate(key: string, fallback?: string, options?: any): string; export declare function updateDocumentLanguage(lang?: string): void; export declare function getI18nDebugInfo(): { isInitialized: boolean; currentLanguage: string; globalCurrentLang: string | null; globalDefaultLang: string; isSSR: boolean; cookies: string | null; localStorage: string | null; };