UNPKG

i18n-ai-translate

Version:

AI-powered localization CLI, Node library, and GitHub Action. Translate i18next JSON, Gettext PO, Java .properties, and iOS .strings with ChatGPT, Claude, Gemini, or local Ollama models.

26 lines (25 loc) 1.05 kB
import type FormatAdapter from "./format_adapter"; /** * Look up an adapter by its `--format <name>` identifier. * @param name - adapter name (e.g. `"json"`) * @returns the matching adapter, or undefined */ export declare function getAdapterByName(name: string): FormatAdapter<unknown> | undefined; /** * Look up an adapter by file extension (leading dot included or not). * @param ext - the file extension, case-insensitive * @returns the matching adapter, or undefined */ export declare function getAdapterByExtension(ext: string): FormatAdapter<unknown> | undefined; /** * Resolve an adapter from a filename, or fall back to the default * JSON adapter. Used by the file wrappers when the caller hasn't * passed `--format` explicitly. * @param filename - the filename to inspect * @returns the matching adapter, or the JSON default */ export declare function getAdapterForFile(filename: string): FormatAdapter<unknown>; /** * @returns the names of every registered adapter */ export declare function listFormatNames(): string[];