// readme

locale-ai

Translate your i18n locale files locally, on CPU, for free. No API keys, no Python, nothing leaves your machine.

npx locale-ai translate --from en --to fr,es,de
locale-ai 0.6.3
Found 3 en files in locales/en/
Models to download (one time, then cached for every project):
  en-fr         345 MB  khabouss/opus-mt-tc-big-en-fr-onnx
  ...
Download 577 MB? (Y/n)
βœ“ fr         43 strings translated, 3 files written in 2.7s, 1 plural forms added
βœ“ es         43 strings translated, 3 files written in 2.5s, 1 plural forms added
βœ“ de         43 strings translated, 3 files written in 2.1s

Behind a proxy or in locked-down CI? npm install pulls in onnxruntime-node, which tries to download a ~260Β MB CUDA provider locale-ai never uses (it only ever runs on CPU) β€” on a network that can’t reach api.nuget.org, that download failing takes the whole install down with it. Skip it with:

ONNXRUNTIME_NODE_INSTALL=skip npm install locale-ai

That’s also the faster way to install even with a good connection β€” about 51Β MB and 3 seconds instead of several hundred MB. locale-ai re-checks for (and removes) that CUDA provider on…