UNPKG

i18n-pro

Version:

An out-of-the-box, lightweight JavaScript i18n auto-translation solution

20 lines (19 loc) 516 B
import { BasicOpenAIConfig } from '../../type'; /** * 设置翻译配置 * @param configProp */ export declare function setOpenAIConfig(configProp: BasicOpenAIConfig): void; /** * 翻译多个文本到单个语言的具体实现 */ export declare function translateByOpenAI(props: { texts: string[]; from: string; to: string; tokens: number; }): Promise<{ success: Record<string, string>; error: Record<string, string>; textErrorMsg: Record<string, string[]>; }>;