Skip to main content

Ollang SDK Features

The SDK provides three main entry points: the Ollang Asset Management for local project workflows, the Browser SDK for CMS content capture, and the Node.js API for programmatic access.

Ollang Asset Management

The Asset Management combines a local Node.js server with a React control panel to manage translations for your codebase. It works with i18n JSON files, hardcoded strings, videos, images, and audio.

What Asset Management Does

FeatureDescription
Project ScanDetects i18n strings, hardcoded text, videos, images, and audio in your project.
Folder-Based WorkspacesCreate separate folders (e.g., “local-project”, “cms-content”) to keep content isolated.
Kanban WorkflowTrack items through Scanned → Translating → Translated → Submitted.
Sync with CodebaseApply translations back to JSON files; detect manual changes and sync status.
Multi-LanguageTranslate to multiple target languages in one flow.

Running the Asset Management UI

The Asset Management server hosts a web control panel. When you run npx @ollang-dev/sdk start, it:
  1. Starts the Node server (default port 5972)
  2. Opens http://localhost:5972 in your browser
  3. Serves the control panel where you can scan, translate, and apply
The server runs from your project root. Set OLLANG_API_KEY, OLLANG_PROJECT_ID, and optionally ollang.config.ts for source/target languages and project root.

Configuration

Configure Asset Management via environment variables or ollang.config.ts in your project root:
ollang.config.ts
export default {
  projectRoot: "/xxx/xxx/xxx/xxx/xxx",
  sourceLanguage: "en",
  targetLanguages: ["tr", "ko", "es"],
  video: {
    translationType: "aiDubbing" as "aiDubbing" | "subtitle",
  },
};

Browser SDK

The Browser SDK captures CMS content (e.g., Strapi, custom headless CMS) directly from your live site. It injects a script into your page and intercepts API calls to detect translatable content.

How It Works

  1. Add the Ollang Browser script to your CMS-powered site.
  2. Append ?ollang-localize=true to the URL to enable capture mode.
  3. The script shows a debug panel and captures content as you navigate.
  4. Push content to Ollang from the control panel.

Including the Browser SDK

<script src="https://unpkg.com/@ollang-dev/sdk/dist/browser/ollang-browser.min.js"></script>
Or with a config object:
<script>
  window.ollangConfig = {
    strapiUrl: "https://your-cms.com/api",
  };
</script>
<script src="https://unpkg.com/@ollang-dev/sdk/dist/browser/ollang-browser.min.js"></script>

Opening CMS Capture Mode

  1. Run Asset Management server: npx @ollang-dev/sdk start
  2. Open the control panel at http://localhost:5972
  3. Create or select a CMS folder from the folder dropdown
  4. Open your CMS site in another tab with ?ollang-localize=true appended
  5. The debug panel appears; content is captured as you browse

Node.js API

For programmatic use, import @ollang/sdk and use the Ollang client:
import Ollang from '@ollang-dev/sdk';

const ollang = new Ollang({
  apiKey: process.env.OLLANG_API_KEY,
  baseUrl: 'https://api-integration.ollang.com',
});

// Create translation orders
const order = await ollang.orders.create({ ... });

// Manage projects and uploads
const projects = await ollang.projects.list();
const upload = await ollang.uploads.uploadFile(file);

// Scan sessions for Asset Management
const session = await ollang.scans.getOrCreateSession(projectId, folderName);

Available Modules

ModulePurpose
ollang.ordersCreate, list, cancel, and manage translation orders
ollang.projectsList and inspect projects
ollang.uploadsUpload source files (video, document, VTT)
ollang.revisionsCreate and manage revision requests
ollang.scansGet/create scan sessions, create/update scans (Asset Management backend)
ollang.cmsCMS-specific endpoints
ollang.customInstructionsManage translation guidelines

Folder-Based Workflows

Asset Management supports multiple folders per project. Use them to separate:
  • Local project — i18n, hardcoded strings, local media
  • CMS content — Content pushed from the browser (Strapi, custom CMS)
Each folder has its own scan state and Kanban board. Content does not mix between folders.

Next Steps