UNPKG

@lzwme/m3u8-dl

Version:

A free, open-source, and powerful m3u8 video batch downloader with multi-threaded downloading, play-while-downloading, WebUI management, video parsing, and more.

28 lines (27 loc) 711 B
/** * Shared i18n utility for backend (CLI, SDK, Server) */ import type { AnyObject } from '@lzwme/fe-utils'; type Locale = 'zh-CN' | 'en'; export declare const LANG_CODES: Set<string>; /** * Detect language from OS or environment */ export declare function detectLanguage(): Locale; /** * Set global language context */ export declare function setLanguage(lang: Locale | null): void; /** * Get global language context */ export declare function getLanguage(): Locale | null; /** * Get language from various sources */ export declare function getLang(lang?: string): Locale; /** * Translation function */ export declare function t(key: string, lang?: string, params?: AnyObject): string; export {};