Skip to main content

Loco — Translation Engine

Loco is a self-hosted, open-source translation management system. Drop in a single <script> tag — Loco auto-discovers every text node on your page, sends them to a management dashboard, and lets AI handle the translations.

Key features

  • Zero-code setup — One <script> tag, no build pipeline changes
  • Auto text discovery — TreeWalker scans TEXT_NODEs, input values, placeholder/title attributes, and mixed inline content (including dynamic SPA content via MutationObserver)
  • Variable slots — Inline elements (<var>, <strong>, <time>, <span>) become typed placeholders ({{number:0}}, {{text:0}}, {{date:0}}) that survive translation and rehydrate at runtime
  • Two modes — Server Mode (live API) or File Mode (static JSON, no server needed)
  • AI translations — Batch-translate via BlueHive AI; slot tokens are stripped before AI and restored after
  • Chrome Extension — In-context editing side panel for any page running the snippet
  • Analytics — Coverage by language, phrase count by URL, discovery over time
  • Self-hosted — Your data stays on your server; SQLite backend, no external DB required

Architecture overview

Browser page (loco.js)
└─ discovers text → POST /api/textnodes
└─ fetches translations → GET /api/translations?lang=fr

Fastify server (:6101)
├─ /api/* REST API (requires X-API-Key)
├─ /dashboard/ Svelte management dashboard
├─ /docs/ This documentation
├─ /cdn/ Static CDN files (loco.js, translation JSONs)
└─ /assets/ SVG icons and images

SQLite database (loco.db)
├─ projects Project config, API key, settings
├─ textnodes Discovered phrases (key, context, status)
├─ translations Translated values per language
├─ prompt_templates AI prompt templates
└─ ai_job_log AI translation job history

Quick navigation

I want to…Go to
Get up and running fastQuick Start
Install via npm or from sourceInstallation
Connect a live page to the serverServer Mode
Ship without a server at runtimeFile Mode
See all JavaScript methodsClient API
Understand dynamic value handlingVariable Slots
See the full REST APIREST API Reference
Use AI batch translationsAI Translations
Deploy to productionSelf-Hosting