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
11 lines (10 loc) • 460 B
TypeScript
import type { ITranslate } from "./translate.interface";
export declare class GoogleTranslate implements ITranslate {
private googleTranslate;
private supportedLanguages;
private constructor();
static initialize(apiKey: string): Promise<GoogleTranslate>;
private static getSupportedLanguages;
isValidLocale(targetLocale: string): boolean;
translateText(text: string, _sourceLocale: string, targetLocale: string): Promise<string>;
}