API Overview
File Translation
File translation lets you upload localization files and turn them into translated project content.
When To Use It
Use file uploads when your source translations already live in files, such as en.json, and you want Lezu to import and translate them.
Upload a JSON File
POST /v1/i18n/projects/project_123/files/json-import
Authorization: ApiKey lez_...
Content-Type: multipart/form-data
Form fields:
file: en.json
locale: en
targetLocales: ["nl", "fr"]
translateMissing: true
What Happens
- Lezu reads the uploaded JSON file.
- Nested keys are converted into translation keys.
- Source values are added to the project.
- Missing target-language values can be translated automatically.
- You can review imported values and publish release bundles.
Supported Content
JSON imports should contain nested objects with string values:
{
"home": {
"title": "Welcome",
"cta": "Start now"
}
}
Unsupported values return validation errors so the file can be fixed and uploaded again.