Translate File
translate_fileRead a JSON locale file, translate it into specified languages, and write translated JSON files, optionally reusing existing translations for incremental updates.
Instructions
Read a JSON locale file from disk, translate it into one or more languages, and write .json files. Set incremental=true to reuse existing output files and only translate new/missing keys.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | Yes | Target language code(s), comma-separated, e.g. "es,fr,de" | |
| from | No | Source language code (default: en) | |
| path | Yes | Path to the source locale JSON file, e.g. locales/en.json | |
| model | No | ||
| outDir | No | Output directory (default: same directory as the source file) | |
| provider | No | ||
| incremental | No | Reuse existing <lang>.json and only translate new keys |