Download and import translation files from your terminal
The multilocale package on npm is a command line client for projects that keep their translations as files. Every step runs without a browser, including creating the account: signup --email prints a session to stdout and stores it where the other commands look, so a script or an agent can go from nothing to translated files without a person clicking anything. It downloads a project into JSON, JavaScript, Swift, Android or Gatsby layouts, imports files you already have, adds, updates and deletes phrases, and reports duplicate and unused keys — so localization fits into the same build step as the rest of your assets.
# Run it with npx, or install it as a devDependency
npx multilocale --help
# Create an account from the terminal — no browser, no dashboard
npx multilocale signup --email you@example.com --json
# Create a project and the locales it ships
npx multilocale projects create "my-app" --locales en,es,fr --default-locale en
# Push the translation files you already have …
npx multilocale import
# … and write every locale back into your repository
npx multilocale download# Already have an account? Sign in with the browser flow instead of signup
multilocale login
multilocale projects list
# Add a phrase and machine-translate it into every project locale
multilocale add "Save changes"
# Correct one translation by hand
multilocale update "Save changes" "Enregistrer les modifications" -l fr
multilocale duplicates # values translated twice
multilocale unused # keys no source file references any more
# Every command that returns data takes --json, so a script or an agent
# can read the result instead of parsing the human output
multilocale download --json{
"projectId": "YOUR_PROJECT_ID",
"format": "json",
"paths": ["messages/%lang%.json"]
}Anywhere under the working directory. It selects the project and the download layout, so none of the commands above need a flag.
signup --email creates the account, the organization and a first project from the terminal, and stores the session the other commands read.
Write translation files into your repository, or import the files you already ship.
Detects JSON, JavaScript, Swift, Android resource and Gatsby projects and writes the matching format.
Lists values translated twice, and keys no source file references any more, so the dictionary stays clean.