UNPKG

i18ntk

Version:

🚀 The fastest i18n toolkit with 97% performance boost! Zero-dependency, enterprise-grade internationalization for React, Vue, Angular, Python, Java, PHP & more. Features PIN protection, auto framework detection, 7+ UI languages, and comprehensive transla

30 lines (24 loc) • 826 B
// runtime/index.d.ts // Public runtime API types for i18ntk export interface InitOptions { baseDir?: string; language?: string; fallbackLanguage?: string; keySeparator?: string; preload?: boolean; } export type TranslateParams = Record<string, unknown>; export function translate(key: string, params?: TranslateParams): string; export const t: typeof translate; export function initRuntime(options?: InitOptions): { t: typeof translate; translate: typeof translate; setLanguage: typeof setLanguage; getLanguage: typeof getLanguage; getAvailableLanguages: typeof getAvailableLanguages; refresh: typeof refresh; }; export function setLanguage(lang: string): void; export function getLanguage(): string; export function getAvailableLanguages(): string[]; export function refresh(lang?: string): void;