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

# Quick Start

> Get Ollang SDK running locally in under 5 minutes.

# Quick Start

This guide walks you through installing the Ollang SDK, configuring your project, starting the Asset Management interface, and (optionally) enabling the browser CMS capture.

## 1. Install the SDK

```bash theme={null}
npm install @ollang-dev/sdk
```

Or with yarn:

```bash theme={null}
yarn add @ollang-dev/sdk
```

## 2. Get Your API Key

1. Sign up or log in at [Olabs](https://lab.ollang.com)
2. Create or select a project
3. Generate an API key from project settings
4. Set it in your environment:

```bash theme={null}
export OLLANG_API_KEY="your-api-key"
```

## 3. Configure Your Project

In your project root, create `ollang.config.ts`:

```typescript theme={null}
// ollang.config.ts
export default {
  projectRoot: "/xxx/xxx/xxx/xxx/xxx",
  sourceLanguage: "en",
  targetLanguages: ["tr", "ko", "es"],
  video: {
    translationType: "aiDubbing" as "aiDubbing" | "subtitle",
  },
};
```

## 4. Start the Asset Management Interface

From your project root, run:

```bash theme={null}
npx @ollang-dev/sdk start
```

This starts the Ollang Asset Management server. The control panel opens automatically in your browser at:

```
http://localhost:5972
```

<Note>
  If the browser doesn't open automatically, visit
  [http://localhost:5972](http://localhost:5972) manually.
</Note>

### What the Asset Management Does

* **Scans** your i18n files (JSON, YAML), hardcoded strings, videos, images, and audio
* **Shows** a Kanban board (Scanned → Translating → Translated → Submitted)
* **Sends** selected items to Ollang for translation
* **Applies** translations back to your codebase

## 5. Run Your First Scan

1. In the Asset Management UI, enter your API key if prompted
2. Select a **folder** (or create one, e.g. `local-test`) for local project content
3. Click **Scan Project**
4. Wait for the scan to complete — items appear in the Scanned column
5. Select items, choose a target language, and click **Translate**

## 6. Browser CMS Capture (Optional)

For CMS content (e.g., Strapi), add the Browser SDK to your site.

### Install the script

Add to your HTML, before `</body>`:

```html theme={null}
<script src="https://unpkg.com/@ollang-dev/sdk/dist/browser/ollang-browser.min.js"></script>
```

Or configure programmatically:

```html theme={null}
<script>
  window.ollangConfig = {
    strapiUrl: "https://your-strapi.com",
  };
</script>
<script src="https://unpkg.com/@ollang-dev/sdk/dist/browser/ollang-browser.min.js"></script>
```

### Open the browser for CMS capture

1. Visit your site with `?ollang-localize=true` in the URL
2. The debug panel appears; use it to capture CMS content
3. Push content to Ollang; it appears in the Asset Management under the CMS folder

## Ports and URLs

| Service                         | Default URL                                                    |
| ------------------------------- | -------------------------------------------------------------- |
| Asset Management Control Panel  | [http://localhost:5972](http://localhost:5972)                 |
| Asset Management API (internal) | [http://localhost:5972/api/\\](http://localhost:5972/api/\\)\* |

Use `ASSET_MANAGEMENT_PORT` to change the port:

```bash theme={null}
ASSET_MANAGEMENT_PORT=8080 npx @ollang-dev/sdk start
```

### CORS and allowed origins

By default, the Asset Management server allows common local dev origins such as
`http://localhost:3000`, `http://127.0.0.1:3000`, `http://localhost:4200`, and
`http://127.0.0.1:4200`.

If you run your frontend on a different origin (for example
`http://127.0.0.1:4200` or a custom dev domain), add it via the
`TMS_CORS_ORIGINS` environment variable when starting the SDK:

```bash theme={null}
TMS_CORS_ORIGINS=http://127.0.0.1:4200 npx @ollang-dev/sdk start
```

You can specify multiple origins, comma-separated:

```bash theme={null}
TMS_CORS_ORIGINS=http://127.0.0.1:4200,http://localhost:1234 npx @ollang-dev/sdk start
```

## Troubleshooting

<AccordionGroup>
  <Accordion title="Asset Management fails to start">
    Ensure you run `npx @ollang-dev/sdk start` from your project root where
    `ollang.config.ts` (or env vars) is set. Run `npm run build` in the SDK
    package if you're developing from source.
  </Accordion>

  <Accordion title="API key not accepted">
    Verify your key at [Olabs](https://lab.ollang.com). Ensure `OLLANG_API_KEY`
    is set or entered in the Asset Management UI.
  </Accordion>

  <Accordion title="Browser doesn't open">
    Manually visit [http://localhost:5972](http://localhost:5972). On some
    systems, the `open` package may not launch a browser.
  </Accordion>

  <Accordion title="No items after scan">
    Check `includePaths` and `includePatterns` in your config. Ensure your i18n
    files match the configured paths (e.g., `messages/*.json`,
    `locales/**/*.json`).
  </Accordion>
</AccordionGroup>

## Next Steps

<CardGroup cols={2}>
  <Card title="Features" icon="wrench" href="/sdk/features">
    Learn about Asset Management folders, Browser SDK, and Node API.
  </Card>

  <Card title="Ollang API" icon="book-open-cover" href="/apis/ollang-api-reference/direct-file-upload">
    Use the REST API directly for advanced workflows.
  </Card>
</CardGroup>
