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
| Feature | Description |
|---|---|
| Project Scan | Detects i18n strings, hardcoded text, videos, images, and audio in your project. |
| Folder-Based Workspaces | Create separate folders (e.g., “local-project”, “cms-content”) to keep content isolated. |
| Kanban Workflow | Track items through Scanned → Translating → Translated → Submitted. |
| Sync with Codebase | Apply translations back to JSON files; detect manual changes and sync status. |
| Multi-Language | Translate to multiple target languages in one flow. |
Running the Asset Management UI
The Asset Management server hosts a web control panel. When you runnpx @ollang-dev/sdk start, it:
- Starts the Node server (default port 5972)
- Opens
http://localhost:5972in your browser - 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 orollang.config.ts in your project root:
ollang.config.ts
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
- Add the Ollang Browser script to your CMS-powered site.
- Append
?ollang-localize=trueto the URL to enable capture mode. - The script shows a debug panel and captures content as you navigate.
- Push content to Ollang from the control panel.
Including the Browser SDK
Opening CMS Capture Mode
- Run Asset Management server:
npx @ollang-dev/sdk start - Open the control panel at
http://localhost:5972 - Create or select a CMS folder from the folder dropdown
- Open your CMS site in another tab with
?ollang-localize=trueappended - The debug panel appears; content is captured as you browse
Node.js API
For programmatic use, import@ollang/sdk and use the Ollang client:
Available Modules
| Module | Purpose |
|---|---|
ollang.orders | Create, list, cancel, and manage translation orders |
ollang.projects | List and inspect projects |
ollang.uploads | Upload source files (video, document, VTT) |
ollang.revisions | Create and manage revision requests |
ollang.scans | Get/create scan sessions, create/update scans (Asset Management backend) |
ollang.cms | CMS-specific endpoints |
ollang.customInstructions | Manage 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)