WooCommerce plugin docs / Multilingual AI

Multilingual AI

Overview

Shopper-facing replies use an allow-list of languages. This is separate from translating wp-admin.

Supported languages (verified)

Auto Detect, English, Spanish, French, German, Italian, Portuguese, Arabic, Bengali, Hindi, Chinese, Japanese.

No other languages are supported. Invalid settings become Auto Detect. Unsupported detected languages fall back to English (Language_Catalog::DEFAULT_CODE = en) where a code is required.

How It Works

  1. Merchant sets AI Language (auto or a code).
  2. If fixed: every reply uses that code (overrides detection).
  3. If Auto Detect: Language_Detector inspects the message; optional session memory stores the code on the conversation; WordPress locale can seed bootstrap.
  4. System prompt includes the English language name for the model.
  5. Widget sets dir="rtl" for Arabic.
  6. Fallback strings are chosen from the same allow-list.

The browser cannot POST a language to force replies (Language_Resolver does not trust client-supplied language).

How to Enable It

WooCommerce → AI Assistant → Settings → AI Language.

Configuration

AI Language settings.

Frontend Usage

Shoppers write in their language. With Auto Detect + Remember, the chat stays in that language until they clearly switch.

Example

Bengali first message on Auto Detect → Bengali LLM replies (if AI is up) and Bengali fallback strings if AI is down — unless Appearance Welcome Message was customized in English.

Behavior

SituationWhat happens
Auto DetectPer message + optional session memory
Fixed languageAlways that language
Remember offRe-detect more often
AI unavailableStatic fallback map for the resolved code
Appearance welcome savedOverrides language-aware welcome

Limitations

  • Detection is heuristic, not a full CLD library.
  • Admin UI language follows WordPress locale / languages/ (no .pot shipped yet — Domain Path is /languages).
  • Chinese is a single zh code (not separate Simplified/Traditional settings).

Troubleshooting

Wrong language: set a fixed language. Welcome always English: clear Appearance Welcome Message. RTL issues: only Arabic is marked RTL.