How Shallok Works
A deterministic 5-phase pipeline from raw hardcoded UI strings to verified, AI-translated multi-locale applications.
One Command.
Auto-Detects Everything.
Developers run npx shallok setup in any repository. Shallok inspects your project root, package configuration, and existing routing architecture.
- ✔Auto-Detects Framework: Next.js App/Pages Router, Astro, React Vite, Expo, Vue, or Svelte.
- ✔Zero Global Bloat: Installs
shallokdirectly into projectdevDependencies. - ✔Injects AI Skills: Drops rules into
.agents/skills/and.cursor/rules/.
Babel AST Parsing.
Never Fragile Regex.
Legacy tools use regular expressions that break nested JSX children, props, conditional ternary operators, and template literals.
Shallok parses the real TypeScript / JavaScript syntax tree, replacing hardcoded strings with t('key') and injecting the translation hooks automatically.
- ✔Preserves complex JSX expressions and nested children trees.
- ✔Automatically injects
useTranslations()hooks into component headers. - ✔Extracts strings with deterministic key generation into the root catalog.
Per-Key SHA-256.
No Overwrite Collisions.
When you edit 1 English sentence out of 500, legacy systems invalidate entire language catalogs or lose your git history.
Shallok cryptographically hashes each string. Only the modified key bumps its version (v1 → v2). The remaining 499 keys remain untouched, eliminating accidental re-translations.
- ✔Zero accidental re-translations for unchanged strings.
- ✔Tracks version lineage per key in
localization.json. - ✔Stale key detector triggers agent translation only where diffs exist.
Zero API Fees.
Uses Your Active Agent.
No $400/month SaaS translation bills or external OpenAI API keys to configure and maintain.
Shallok orchestrates the coding agent already active in your IDE (Antigravity, Cursor, Claude Code) to translate missing keys contextually, verifying ICU interpolation tokens {count} with 100% rigor.
- ✔0 External API Bills: Leverage existing subscription agent seats.
- ✔ICU Integrity Validation: Guarantees variable placeholders are never scrambled.
- ✔Supports Indic languages (Kannada, Hindi, Tamil) & global locales out-of-the-box.
Real-Time Telemetry.
Native MCP Route.
The companion shallok-dash delivers real-time visibility across all translation catalogs, audit statuses, and localization health.
Exposes a native Model Context Protocol route at /mcp so Claude Desktop, Cursor AI, or Antigravity can inspect live telemetry and query keys via structured tool calls.
- ✔Globally synchronized catalog storage with sub-10ms query latency.
- ✔JSON-RPC 2.0 MCP tools:
list_items,create_item,get_system_stats. - ✔Exports verified multi-locale JSON catalogs into production builds.