i18n-ai-translate
Version:
Use LLMs to translate your i18n JSON to any language.
21 lines (20 loc) • 1.16 kB
TypeScript
import type { TranslateItemInput, VerifyItemInput } from "./types";
import type OverridePrompt from "../interfaces/override_prompt";
/**
* Prompt an AI to convert a given input from one language to another
* @param inputLanguage - The language of the input
* @param outputLanguage - The language of the output
* @param translateItems - The input to be translated
* @param overridePrompt - An optional custom prompt
* @returns A prompt for the AI to translate the input
*/
export declare function translationPromptJSON(inputLanguage: string, outputLanguage: string, translateItems: TranslateItemInput[], overridePrompt?: OverridePrompt): string;
/**
* Prompt an AI to ensure a translation is valid
* @param inputLanguage - The language of the input
* @param outputLanguage - The language of the output
* @param verificationInput - The input to be translated
* @param overridePrompt - An optional custom prompt
* @returns A prompt for the AI to verify the translation
*/
export declare function verificationPromptJSON(inputLanguage: string, outputLanguage: string, verificationInput: VerifyItemInput[], overridePrompt?: OverridePrompt): string;