Home Tutorials Categories Skills About
ZH EN JA KO
Configuration

OpenClaw Multi-Language and Localization Settings

· 21 min read

Introduction

OpenClaw is used worldwide, and multi-language support is one of its core features. Whether your users speak Chinese, English, Japanese, or any other language, OpenClaw can handle it with ease. This article covers how to configure response language, interface language, per-channel language settings, and how to use automatic detection to intelligently match the user's language.

Language Configuration Overview

OpenClaw's language settings operate at three levels:

Level Description Configuration Location
AI Response Language Which language the AI uses to reply persona.language
Dashboard Interface Language The admin panel's display language gateway.locale
System Log Language The language of runtime logs logging.locale

Basic Language Configuration

Set the Global Response Language

Configure in openclaw.json5:

{
  persona: {
    language: "zh-CN",  // Simplified Chinese
  },
}

Supported Language Codes

Language Code Language Notes
zh-CN Simplified Chinese Mainland China
zh-TW Traditional Chinese Taiwan region
en English International
ja Japanese Japan
ko Korean South Korea
fr French France and other regions
de German Germany and other regions
es Spanish Spain, Latin America
pt Portuguese Portugal, Brazil
ru Russian Russia
ar Arabic Middle East
auto Auto-detect Determined by user input

Automatic Language Detection

When the language is set to auto, OpenClaw automatically detects the user's input language and responds in the same language:

{
  persona: {
    language: "auto",

    // Detailed auto-detection configuration
    languageDetection: {
      // Enable auto-detection
      enabled: true,

      // Default language when detection fails
      fallbackLanguage: "zh-CN",

      // Detection confidence threshold (0-1)
      confidenceThreshold: 0.7,

      // Whether to remember the user's language preference
      rememberPreference: true,
    },
  },
}

How Auto-Detection Works

User sends a message
    ├─ Analyze message text
    ├─ Determine language and confidence level
    │   ├─ Confidence > threshold → Use detected language
    │   └─ Confidence < threshold → Use default language
    ├─ When rememberPreference=true
    │   └─ Record the user's language preference
    └─ Generate response in the matched language

Practical Examples

When language: "auto":

  • User sends "你好" → AI responds in Chinese
  • User sends "Hello" → AI responds in English
  • User sends "こんにちは" → AI responds in Japanese
  • User sends mixed languages → Responds in the predominant language

Per-Channel Language Settings

Different messaging channels may serve different language communities. OpenClaw supports independent language configuration for each channel:

{
  persona: {
    // Global default language
    language: "zh-CN",

    // Per-channel overrides
    channelOverrides: {
      // Telegram Chinese group — Simplified Chinese
      telegram: {
        language: "zh-CN",
      },

      // Discord international community — Auto-detect
      discord: {
        language: "auto",
        languageDetection: {
          fallbackLanguage: "en",
        },
      },

      // Slack Japan team — Japanese
      slack: {
        language: "ja",
      },

      // WhatsApp customer service — Auto-detect, default Chinese
      whatsapp: {
        language: "auto",
        languageDetection: {
          fallbackLanguage: "zh-CN",
          rememberPreference: true,
        },
      },

      // LINE — Traditional Chinese
      line: {
        language: "zh-TW",
      },
    },
  },
}

Combining with System Prompts

Language settings can work together with system prompts to ensure the AI's response language and style are consistent:

{
  persona: {
    language: "zh-CN",
    systemPrompt: "你是小智,一个友好的中文AI助手。请始终使用简体中文回复,使用地道的中文表达,避免过度使用英文词汇。",

    channelOverrides: {
      discord: {
        language: "en",
        systemPrompt: "You are Claw, a helpful English-speaking AI assistant. Always respond in natural, conversational English.",
      },
    },
  },
}

Multi-Language System Prompt Template

If your AI assistant needs to handle multiple languages, you can provide explicit guidance in the prompt:

{
  persona: {
    language: "auto",
    systemPrompt: `你是一个多语言AI助手。

## 语言规则
1. 始终使用与用户相同的语言回复
2. 如果用户使用中英混合,优先用中文回复
3. 专业术语保留原文,括号内附中文解释
4. 代码注释使用英文

## 各语言风格
- 中文:使用简洁的口语化表达
- English: Use clear and concise language
- 日本語:丁寧語を使用してください`,
  },
}

Dashboard Interface Language

The OpenClaw admin panel supports multiple interface languages:

{
  gateway: {
    // Dashboard interface language
    locale: "zh-CN",

    // Available values: zh-CN, zh-TW, en, ja, ko, fr, de, es
  },
}

Restart OpenClaw after making changes for them to take effect:

openclaw restart

Visit http://localhost:18789/dashboard to see the result.

System Log Language

System logs default to English, but you can switch to other languages:

{
  logging: {
    // Log language
    locale: "zh-CN",

    // With Chinese logs, output looks like:
    // [信息] 网关已启动,端口:18789
    // [信息] 模型提供商:Claude(claude-sonnet-4-20250514)
    // [信息] 频道已就绪
  },
}

We recommend using Chinese logs during development for easier understanding, and English logs in production for easier searching and debugging.

User Manual Language Switching

Users can switch languages in chat using commands:

/lang zh-CN    → 切换到简体中文
/lang en       → Switch to English
/lang ja       → 日本語に切り替える
/lang auto     → Enable auto-detection
/lang list     → View supported languages

The switch takes effect immediately, and all subsequent conversations will use the new language.

Translation Assistance Feature

OpenClaw includes a built-in translation assistance feature that can append translations to responses:

{
  persona: {
    language: "zh-CN",

    // Translation assistance
    translation: {
      // Enable bilingual responses
      bilingual: false,

      // Second language for bilingual responses
      secondLanguage: "en",

      // Bilingual response format
      format: "parallel",  // parallel or footnote

      // Enable translation via command
      commandEnabled: true,  // Allow users to translate with /translate
    },
  },
}

Bilingual Response Examples

When bilingual: true and format: "parallel":

User: 今天天气怎么样?

AI:
今天天气晴朗,气温约25度,适合出门活动。

Today is sunny with a temperature of about 25°C, perfect for outdoor activities.

When format: "footnote":

User: 今天天气怎么样?

AI:
今天天气晴朗,气温约25度,适合出门活动。
[EN] Today is sunny with a temperature of about 25°C.

Localization Best Practices

Optimizing for Chinese Users

{
  persona: {
    language: "zh-CN",
    systemPrompt: `你是一个面向中文用户的AI助手。

## 中文回复规范
- 使用简体中文
- 数字使用阿拉伯数字
- 日期格式:YYYY年MM月DD日
- 时间格式:HH:MM(24小时制)
- 货币格式:¥100.00
- 使用中文标点符号(,。!?)
- 段落之间空一行
- 技术术语可保留英文原文`,
  },
}

Supporting Multi-Region Chinese Users

{
  persona: {
    language: "auto",
    languageDetection: {
      // Distinguish between Simplified and Traditional
      distinguishVariants: true,
      fallbackLanguage: "zh-CN",
    },

    // Simplified/Traditional Chinese conversion
    chineseVariant: {
      // auto: Automatically match user input
      // simplified: Always use Simplified
      // traditional: Always use Traditional
      mode: "auto",
    },
  },
}

Handling Multi-Language Group Chats

For multi-language group chats (such as international Discord servers), the recommended configuration is:

{
  persona: {
    language: "auto",
    languageDetection: {
      enabled: true,
      fallbackLanguage: "en",
      confidenceThreshold: 0.8,
      rememberPreference: true,
    },

    systemPrompt: `You are a multilingual AI assistant in an international community.

## Language Rules
- Detect and respond in the same language as the user
- If unsure, respond in English
- For mixed-language messages, use the predominant language
- Always be respectful of cultural differences
- Use culturally appropriate expressions`,
  },
}

Complete Multi-Language Configuration Example

Here is a complete multi-language configuration covering common scenarios:

{
  gateway: {
    port: 18789,
    locale: "zh-CN",
  },

  persona: {
    name: "小智",
    language: "auto",

    languageDetection: {
      enabled: true,
      fallbackLanguage: "zh-CN",
      confidenceThreshold: 0.7,
      rememberPreference: true,
    },

    systemPrompt: "你是小智,一个多语言AI助手。使用与用户相同的语言回复,保持友好和专业。",

    channelOverrides: {
      telegram: {
        language: "zh-CN",
        name: "小智",
      },
      discord: {
        language: "auto",
        name: "Claw",
        languageDetection: {
          fallbackLanguage: "en",
        },
      },
      slack: {
        language: "zh-CN",
        name: "工作助手",
      },
      line: {
        language: "zh-TW",
        name: "小智",
      },
    },

    translation: {
      bilingual: false,
      commandEnabled: true,
    },
  },

  logging: {
    locale: "en",
    level: "info",
  },
}

Verifying Language Settings

After configuration, verify that language settings are working:

# Restart OpenClaw
openclaw restart

# Check configuration
openclaw doctor

# Check whether the Dashboard interface language has changed
# Visit http://localhost:18789/dashboard

Then send test messages in different languages through each channel to confirm the response language is correct.

Summary

OpenClaw's multi-language support lets you serve users around the world with a single system. With automatic language detection, the AI assistant intelligently matches the user's language; with per-channel language configuration, you can deliver localized experiences to different user groups. For most users, we recommend using auto mode with an appropriate fallbackLanguage — it's both flexible and reliable. For specific language scenarios (such as customer service), set a fixed language directly to ensure consistency.

OpenClaw is a free, open-source personal AI assistant that supports WhatsApp, Telegram, Discord, and many more platforms