ai-localize
Version:
A localization service for documents and text with AI translation and Redis caching. Also translate backend data with caching
35 lines • 905 B
TypeScript
export interface LocalizationConfig {
redisUrl: string;
aiApiKey: string;
aiProvider: 'openai' | 'google' | 'azure' | 'gemini';
sourceLanguage?: string;
cacheExpiration?: number;
batchSize?: number;
}
export interface TranslationRequest {
text: string;
targetLanguage: string;
sourceLanguage?: string;
}
export interface TranslationResponse {
translatedText: string;
sourceLanguage: string;
targetLanguage: string;
cached: boolean;
}
export interface DocumentTranslationOptions {
fields?: string[];
excludeFields?: string[];
preserveStructure?: boolean;
batchSize?: number;
}
export interface CachedTranslation {
translatedText: string;
timestamp: number;
sourceLanguage: string;
targetLanguage: string;
}
export interface LocalizationServiceOptions {
config: LocalizationConfig;
}
//# sourceMappingURL=index.d.ts.map