Configuration Schema (`translato.json`)
The translato.json (or .translato.yml) file in your project root controls how the CLI and VCS sync interact with your files.
Schema
{
"project": "my-project-id",
"api": {
"endpoint": "https://api.translato.dev",
"token": "${TRANSLATO_API_KEY}"
},
"paths": {
"locales": "./src/locales",
"source": "en",
"format": "json"
},
"languages": ["en", "de", "fr", "es"],
"hooks": {
"pre-push": "npm run lint:i18n",
"post-pull": "npm run format:i18n"
}
}
Fields
project (required)
The unique ID of your project in Translato. You can find this in the project settings.
api.endpoint
The URL of your Translato API server. Defaults to https://api.translato.dev.
api.token
Your API key. We recommend using an environment variable (${ENV_VAR}) to keep your key out of version control.
paths.locales
The directory where your translation files are stored.
paths.source
The language code of your source file (e.g., en). This file is used for translato push.
paths.format
The file format. Supported: json, yaml, po, properties.
languages
An array of language codes to pull when running translato pull.
hooks
Shell commands to run during the sync process.
pre-push: Runs before keys are sent to the server.post-pull: Runs after local files are updated.