qwen-code/docs/users/features/language.md
Yan Shen 9bd5a0180b
feat(cli): core built-in i18n coverage (#3871)
* feat(i18n): expand built-in locale coverage

* feat(cli): add dynamic slash command translation

* test(cli): stabilize session picker assertions

* fix(core): close jsonl readers before cleanup

* fix: address i18n review regressions

* fix(cli): address dynamic i18n review findings

* fix(cli): address i18n review follow-ups

* fix(cli): address i18n review feedback

* test(cli): align i18n parity coverage with strict locales

* fix(cli): address i18n review findings
2026-05-10 22:35:03 +08:00

5.2 KiB
Raw Blame History

Internationalization (i18n) & Language

Qwen Code is built for multilingual workflows: it supports UI localization (i18n/l10n) in the CLI, lets you choose the assistant output language, and allows custom UI language packs.

Overview

From a user point of view, Qwen Codes “internationalization” spans multiple layers:

Capability / Setting What it controls Where stored
/language ui Terminal UI text (menus, system messages, prompts) ~/.qwen/settings.json
/language output Language the AI responds in (an output preference, not UI translation) ~/.qwen/output-language.md
Custom UI language packs Overrides/extends built-in UI translations ~/.qwen/locales/*.js

UI Language

This is the CLIs UI localization layer (i18n/l10n): it controls the language of menus, prompts, and system messages.

Setting the UI Language

Use the /language ui command:

/language ui zh-CN    # Chinese
/language ui en-US    # English
/language ui ru-RU    # Russian
/language ui de-DE    # German
/language ui ja-JP    # Japanese
/language ui pt-BR    # Portuguese (Brazil)
/language ui fr-FR    # French
/language ui ca-ES    # Catalan

Aliases are also supported:

/language ui zh       # Chinese
/language ui en       # English
/language ui ru       # Russian
/language ui de       # German
/language ui ja       # Japanese
/language ui pt       # Portuguese
/language ui fr       # French
/language ui ca       # Catalan

Auto-detection

On first startup, Qwen Code detects your system locale and sets the UI language automatically.

Detection priority:

  1. QWEN_CODE_LANG environment variable
  2. LANG environment variable
  3. System locale via JavaScript Intl API
  4. Default: English

Dynamic Command Translation

Dynamic slash command descriptions from skills, extensions, file commands, and MCP prompts can be translated with AI. This is off by default to avoid unexpected model calls, latency, and token usage.

/language translate status  # Show current status
/language translate on      # Enable AI translation for dynamic descriptions
/language translate off     # Disable AI translation

Use /language translate cache refresh to re-translate cached dynamic descriptions after enabling translation, or /language translate cache clear to remove cached translations.

LLM Output Language

The LLM output language controls what language the AI assistant responds in, regardless of what language you type your questions in.

How It Works

The LLM output language is controlled by a rule file at ~/.qwen/output-language.md. This file is automatically included in the LLM's context during startup, instructing it to respond in the specified language.

Auto-detection

On first startup, if no output-language.md file exists, Qwen Code automatically creates one based on your system locale. For example:

  • System locale zh creates a rule for Chinese responses
  • System locale en creates a rule for English responses
  • System locale ru creates a rule for Russian responses
  • System locale de creates a rule for German responses
  • System locale ja creates a rule for Japanese responses
  • System locale pt creates a rule for Portuguese responses
  • System locale fr creates a rule for French responses
  • System locale ca creates a rule for Catalan responses

Manual Setting

Use /language output <language> to change:

/language output Chinese
/language output English
/language output Japanese
/language output German

Any language name works. The LLM will be instructed to respond in that language.

Note

After changing the output language, restart Qwen Code for the change to take effect.

File Location

~/.qwen/output-language.md

Configuration

Via Settings Dialog

  1. Run /settings
  2. Find "Language" under General
  3. Select your preferred UI language

Via Environment Variable

export QWEN_CODE_LANG=zh

This influences auto-detection on first startup (if you havent set a UI language and no output-language.md file exists yet).

Custom Language Packs

For UI translations, you can create custom language packs in ~/.qwen/locales/:

  • Example: ~/.qwen/locales/es.js for Spanish
  • Example: ~/.qwen/locales/fr.js for French

User directory takes precedence over built-in translations.

Tip

Contributions are welcome! If youd like to improve built-in translations or add new languages. For a concrete example, see PR #1238: feat(i18n): add Russian language support.

Language Pack Format

// ~/.qwen/locales/es.js
export default {
  Hello: 'Hola',
  Settings: 'Configuracion',
  // ... more translations
};
  • /language - Show current language settings
  • /language ui [lang] - Set UI language
  • /language output <language> - Set LLM output language
  • /settings - Open settings dialog