auto-translate-json-library
Version:
Automatically translates JSON language files to other languages using Google Translate,AWS,Azure,DeepL,OpenAI or local OpenAI compatible server
10 lines (9 loc) • 396 B
TypeScript
import type { ITranslate } from "./translate.interface";
export declare class DeepLTranslate implements ITranslate {
private subscriptionKey;
private type;
private endpoint;
constructor(subscriptionKey: string, type: "free" | "pro");
isValidLocale(targetLocale: string): boolean;
translateText(text: string, sourceLocale: string, targetLocale: string): Promise<string>;
}