mono/packages/ui/dist-lib/i18n.d.ts
babayaga 7f63b07df5 lib
2026-01-20 12:14:45 +01:00

24 lines
915 B
TypeScript

import { default as React, ReactNode } from 'react';
type LangCode = 'en' | 'fr' | 'sw' | 'de' | 'es' | 'it' | 'ja' | 'ko' | 'pt' | 'ru' | 'tr' | 'zh' | 'nl';
export declare const supportedLanguages: {
code: string;
name: string;
}[];
export declare const getCurrentLang: () => LangCode;
export declare const setLanguage: (langCode: LangCode) => void;
export declare const translate: (textKey: string, langParam?: LangCode) => string;
interface TProps {
children: ReactNode;
}
declare const T: React.FC<TProps>;
export declare const getTranslationCache: (lang?: LangCode) => Record<string, string> | Record<string, Record<string, string>>;
export declare const downloadTranslations: (lang?: LangCode) => void;
export declare const getTranslationStatus: (lang?: LangCode) => Record<string, {
loaded: boolean;
keysCount: number;
}> | {
loaded: boolean;
keysCount: number;
};
export { T };