Use Case: Translating a Website
This guide walks through a complete workflow for translating website content using kapi (with the bowrain plugin) and the Bowrain web editor.
Overview
- CLI: Initialize a Bowrain project and configure file mappings
- CLI: Run translation flows (AI, content memory, QA)
- Bowrain: Open local project in visual editor for manual review
- CLI: Push to Bowrain Server for team collaboration (optional)
Step 1: Initialize Project
Create a Bowrain project in your website repository:
# Initialize project with source and target locales
cd my-website/
kapi init --name "Website Translation" --source en-US --targets fr-FR,de-DE,ja-JP
# Check content stats for cost estimation
kapi stats content/**/*.md
# Configure content collections in kapi.yaml
# Edit to map your local files to formats and target paths
Example kapi.yaml:
version: v1
name: Website Translation
defaults:
source_language: en-US
target_languages: [fr-FR, de-DE, ja-JP]
content:
- path: content/**/*.md
format: markdown
target: i18n/{lang}/{path}/{filename}
- path: src/locales/**/*.json
format: json
Step 2: Run Translation Tools and Flows
Execute translation workflows from the CLI:
# List available tools and flows
kapi tools
kapi flows
# Run AI translation (top-level tool command)
kapi translate
# Or create a custom flow with QA checks
# .kapi/flows/translate-website.yaml:
# name: translate-website
# description: Translate website content with AI and QA
# steps:
# - tool: translate
# config:
# provider: anthropic
# model: claude-sonnet-4.5
# - tool: qa
# - tool: term-enforce
kapi run translate-website
Tools and Flows
kapi tools and flows are composable pipelines that run on your local files:
kapi translate: Use LLMs (Anthropic, OpenAI, Ollama) for machine translationkapi exec recycle: Pre-fill translations from content memorykapi exec qa: Rule-based quality checks (whitespace, punctuation, placeholders)kapi run <flow>: Execute a composed or custom multi-tool flow
Tools and flows automatically process all files matching your recipe's content: collections.
Step 3: Review in Bowrain (Optional)
For visual review and manual edits, open your project in the Bowrain desktop app or web UI.
# Launch Bowrain desktop app (if installed)
open -a Bowrain .
Editor Views
Bowrain's editor offers two views for different translation tasks:
| View | Best For |
|---|---|
| Visual | In-context translation — an inline card over a live preview |
| Table | Overview, scanning, and batch operations across many blocks |
Using Terminology
- Import terms (TBX, CSV, JSON) — they are stored in the project terms store
- Add
term-lookupto your flow to show terminology suggestions - Add
term-enforceto validate required terms are used correctly - The Context panel in Bowrain shows matched terms per block
Step 4: Sync with Bowrain Server (Optional)
For team collaboration, connect your project to a Bowrain Server instance:
# Connect to server
kapi init --server https://app.bowrain.cloud --project abc123
# Check sync status
kapi status
# Push translations to server
kapi push
# Pull translations from teammates
kapi pull
The push/pull workflow is similar to git:
| Git | kapi |
|---|---|
git status | kapi status |
git diff | kapi diff |
git pull | kapi pull |
git push | kapi push |
kapi uses content-addressed blocks for efficient incremental sync — only changed blocks transfer over the network.
Tips
- Initialize projects with
kapi initto write akapi.yamlrecipe and.kapi/state directory - Define custom flows in
.kapi/flows/for your specific translation workflow - Use
kapi exec recycleto auto-fill translations from content memory - Import terminology into the project terms store and add
term-lookupto your flow - Run
kapi pseudo-translatefirst to identify potential UI truncation issues - Use pre-push hooks to enforce quality gates before pushing to server
- Commit
kapi.yamlto git; the whole.kapi/state directory is gitignored by default - Check
kapi statusbefore pushing to see what changed