UNPKG

i18n-translate-agent

Version:

An intelligent i18n translation agent powered by OpenAI, supporting automatic translation of JSON files with caching and progress tracking

17 lines (14 loc) 427 B
import path from "path"; import { deleteBatchCache, generateCache } from "./index.js"; // deleteBatchCache({ // keys: ["10001", "10002"], // cacheFolderPath: path.resolve("./src/cache"), // cacheFileName: "common.json", // languages: [], // }); generateCache({ sourceFolderPath: path.resolve("./src/langs"), sourceLanguage: "en", exportFolderPath: path.resolve("./src/cache"), languages: ["ja", "zh-CN"], });