# Translate-on-Tab — Liu Terminal

> Liu Terminal Translate-on-Tab. Translate prompt line input in real-time before sending it to the coding agent to save tokens.

URL: https://liu.software/docs/translate/  
Language: en  
Updated: 2026-10-17

Translate non-English prompt text to English (or another target) on your machine before it is sent to a coding agent — shrinking tokens and improving agent accuracy.

## How to trigger

While typing in a prompt that Liu associates with a supported agent, press Ctrl and Cmd together twice on macOS, or Ctrl and Super together twice on Linux, within translate\_tab\_window\_sec (default 0.4 seconds). Liu translates the current prompt line and replaces it before you submit.

**Keypress:** Double-tap Ctrl+Cmd on macOS or Ctrl+Super on Linux (not Tab alone). Toggle or reconfigure from Cmd+K → Toggle Translate, Translate: Cycle Target Language, Translate: Cycle Backend, or Settings: Translate.

## Backends

translate\_backend is an integer enum (src/translate/translate.h):

- **0 — Agent** — Spawn a one-shot CLI agent (claude / codex / opencode / grok) to translate via a fixed prompt template.
- **1 — Local LLM** — Default. Metal-accelerated local GGUF model when USE\_LOCAL\_LLM is built in; fully offline.
- **2 — API** — Cloud providers: anthropic, openai, openrouter, or custom OpenAI-compatible base URL. Empty api\_key falls back to ANTHROPIC\_API\_KEY / OPENAI\_API\_KEY / etc.

## Active agents

Translation only runs in prompts associated with selected agents. Defaults enable Claude, Codex, OpenCode, Grok, Antigravity, Cline, and Command Code (all translate\_active\_in\_\* flags are true). Configure in Settings → Translate or config.json.

## Configuration keys

In ~/.config/Liu/config.json (defaults from translate\_config\_default):

```
{
  "translate_enabled": true,
  "translate_backend": 1,
  "translate_source_lang": "Turkish",
  "translate_target_lang": "English",
  "translate_tab_window_sec": 0.4,
  "translate_active_in_claude": true,
  "translate_active_in_codex": true,
  "translate_active_in_opencode": true,
  "translate_active_in_grok": true,
  "translate_active_in_antigravity": true,
  "translate_active_in_cline": true,
  "translate_active_in_commandcode": true
}
```

A visual spinner shows while translation is in progress. Local model download/path management is available from Settings when the local backend is selected.

[Next Configuration →](https://liu.software/docs/config.md)
