import { BaseTranslator } from '../BaseTranslator'; import { langCode, langCodeWithAuto } from '../Translator'; /** * Common class for google translator implementations */ export declare abstract class AbstractGoogleTranslator extends BaseTranslator { static isSupportedAutoFrom(): boolean; static getSupportedLanguages(): langCode[]; getLengthLimit(): number; getRequestsTimeout(): number; } /** * Translator implementation which use Google API with token from https://translate.google.com */ export declare class GoogleTranslator extends AbstractGoogleTranslator { static readonly translatorName = "GoogleTranslator"; checkLimitExceeding(text: string | string[]): number; translate(text: string, from: langCodeWithAuto, to: langCode): Promise; translateBatch(text: string[], from: langCodeWithAuto, to: langCode): Promise; } /** * Translator implementation which use Google API without token */ export declare class GoogleTranslatorTokenFree extends AbstractGoogleTranslator { static readonly translatorName = "GoogleTranslatorTokenFree"; translate: (text: string, from: langCodeWithAuto, to: langCode) => Promise; translateBatch(text: string[], from: langCodeWithAuto, to: langCode): Promise; }