> ## Documentation Index
> Fetch the complete documentation index at: https://docs.nt3.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Import & Export

> Import and export translation files in multiple formats.

Entri supports importing and exporting translation files in the formats your project already uses — no conversion required. Bring your existing translations in on day one, and export finished translations directly into your build pipeline.

## Supported Formats

<CardGroup cols={2}>
  <Card title="JSON" icon="brackets-curly">
    Flat (`json-flat`) and nested (`json-nested`) JSON structures. The most common format for web apps and Node.js projects.
  </Card>

  <Card title="YAML" icon="file-code">
    YAML key-value files (`yaml`). Common for Rails and other frameworks.
  </Card>

  <Card title="Android XML" icon="android">
    Android string resource files (`android-xml`) for native Android apps.
  </Card>

  <Card title="iOS .strings / .stringsdict" icon="apple">
    Apple `.strings` files (`ios-strings`) and `.stringsdict` plurals files (`ios-stringsdict`) for native iOS and macOS apps.
  </Card>

  <Card title="XLIFF" icon="file-lines">
    XLIFF 1.2 (`xliff`) and XLIFF 2.0 (`xliff2`) — standard XML bilingual formats for translation tooling.
  </Card>

  <Card title="ARB" icon="flutter">
    Application Resource Bundle (`arb`) — Flutter's localization format.
  </Card>

  <Card title="Gettext PO/POT/MO" icon="terminal">
    GNU Gettext formats: `po` (translation files), `pot` (templates), and `mo` (compiled binary files).
  </Card>
</CardGroup>

## Importing Translations

Use the import flow to bring existing translation files into Entri. This is typically done once when setting up a project, or when receiving translated files from an external vendor.

<Steps>
  <Step title="Open the Import dialog">
    Navigate to your project and select **Import** from the toolbar or the project settings page.
  </Step>

  <Step title="Choose your file and format">
    Upload your translation file and select the corresponding format. For JSON projects, Entri auto-detects whether the file uses flat or nested keys.
  </Step>

  <Step title="Select a language">
    Specify which language the file contains. Source language files are used to create or update keys; target language files populate translations.
  </Step>

  <Step title="Configure conflict resolution">
    Choose how Entri handles keys that already exist in the project:

    * **Skip** — keep the existing translation untouched
    * **Overwrite** — replace the existing translation with the imported value
  </Step>

  <Step title="Review and confirm">
    Entri shows a preview of how many keys will be created, updated, or skipped before you commit the import.
  </Step>
</Steps>

### Namespaces

If your project organizes translations across multiple files (for example, `common.json`, `auth.json`, `dashboard.json`), you can assign a namespace during import. Keys are stored under that namespace so they remain organized by feature or file.

### Via API

You can automate imports through the REST API, which is useful for CI/CD pipelines and vendor integrations.

```bash theme={null}
curl -X POST https://app.nt3.io/api/projects/{projectId}/import \
  -H "X-API-Key: your_api_token" \
  -H "Content-Type: application/json" \
  -d '{
    "language": "fr",
    "format": "json-nested",
    "content": "{\"nav\":{\"home\":\"Accueil\"}}",
    "overwrite": false
  }'
```

Send the file contents as a JSON string in the `content` field — the import endpoint accepts JSON body, not multipart form data.

## Exporting Translations

Export translations to download finished files in the format your codebase expects.

### Export a Single Language

```bash theme={null}
curl -O -J \
  -H "X-API-Key: your_api_token" \
  "https://app.entri.io/api/projects/{projectId}/export/fr?format=json-nested"
```

### Export from the UI

1. Open your project and navigate to **Export**.
2. Select the language (or choose **All languages** to download a ZIP archive).
3. Choose the output format.
4. Click **Download**.

<Note>
  The Entri CLI's `entri pull` command is the recommended way to keep your local files in sync during development. It uses the same export API internally and writes files to the correct paths based on your `.nt3.yml` configuration.
</Note>

## List Supported Formats

To retrieve the list of formats supported by the API at runtime:

```bash theme={null}
GET /api/projects/{projectId}/formats
```

This returns format identifiers and display names that can be passed to the `format` parameter on import and export requests.
