CodeWords raises $9M seed round
BlogResources

How to build a multilingual WhatsApp bot with AI translation

Learn how to build a multilingual WhatsApp bot using AI — no translation APIs needed. Detect language automatically and reply in the same language every time.

Rebecca PearsonRebecca Pearson6 min read
How to build a multilingual WhatsApp bot with AI translation

WhatsApp has over two billion monthly active users, spread across almost every country on earth. For businesses operating across borders — or even across cities with diverse communities — the ability to communicate in a customer's own language isn't a luxury. It's a basic requirement. Building a multilingual WhatsApp bot used to mean maintaining separate flows for each language, integrating a translation API, and hoping it all held together. In 2026, AI makes it dramatically simpler.

TL;DR

  • AI models handle multilingual naturally — modern language models understand and generate dozens of languages without a separate translation API.
  • The system prompt approach is all you need — instruct your agent to "detect the language and reply in the same language" and it works immediately.
  • Formality levels matter — for languages with grammatical register distinctions (Spanish tu/usted, French tu/vous), your prompt should specify the level.

Why multilingual matters more than ever

WhatsApp is the primary communication channel across much of Asia, Africa, Latin America, and the Middle East. For businesses in these markets — or businesses serving diaspora communities in Europe and North America — defaulting to English means leaving customers behind.

The Jumia case study illustrates this well. Jumia's operations span multiple African countries, each with different languages and local dialects. Field reps communicate in French, Arabic, Swahili, and local languages. An AI agent that could only respond in English would be useless for the majority of the conversations it needed to handle. The solution was an agent that detected the language of each incoming message and replied in the same language — automatically, without any manual routing or translation layer.

This pattern applies to any business with a multilingual customer base. A restaurant in a diverse London neighbourhood. A service business in Brussels, where French and Dutch customers come through the same WhatsApp number. A logistics company with depots across multiple countries.

How AI models handle multilingual naturally

Modern large language models — the kind that power CodeWords — are trained on text in dozens of languages. This means they can read, understand, and generate text in French, Spanish, Arabic, Swahili, Portuguese, Hindi, Indonesian, and many more, without needing a separate translation step.

This is fundamentally different from older translation-based approaches, where you'd detect the language, send the text to a translation API, process it in English, translate the response back, and then send it. Each step introduced latency, cost, and potential for errors — especially with idiomatic language or technical terms that don't translate cleanly.

With an AI model, the whole process happens in a single inference call. The model reads the incoming message in whatever language it's written in, generates a response in that language, and sends it. No intermediate translation, no round trips, no language mismatch errors.

The system prompt approach

The simplest way to make your WhatsApp bot multilingual is a single instruction in the system prompt:

"Detect the language of each incoming message and always reply in the same language."

That's it. This instruction, combined with a capable language model, gives you multilingual support immediately. You don't need to build language-detection logic, you don't need to maintain separate prompts for each language, and you don't need to configure any additional services.

When you're building with CodeWords, tell Cody, the AI automation assistant: "My customers message in different languages. Always detect the language they're using and reply in the same language." Cody adds this instruction to the agent's system prompt automatically.

Supported languages

Any language that the underlying model has been trained on is supported. For the major models used by CodeWords, this includes — at minimum:

  • English, French, Spanish, Portuguese, German, Italian, Dutch
  • Arabic, Turkish, Persian
  • Hindi, Bengali, Urdu, Tamil
  • Swahili, Hausa, Amharic
  • Chinese (Simplified and Traditional), Japanese, Korean
  • Indonesian, Malay, Vietnamese, Thai

The model's capability varies by language. For major world languages with large training datasets (English, Spanish, French, Chinese, Arabic), performance is excellent. For less widely spoken languages, the model may still understand the language but produce responses that are less fluent. Testing in your target languages before going live is always worthwhile.

Formality levels for languages with registers

Some languages have distinct formal and informal registers — grammatical forms that change based on how well you know someone or how formal the context is. Spanish distinguishes between tu (informal) and usted (formal). French distinguishes between tu and vous. German has du and Sie. Arabic has colloquial and formal variants.

Without guidance, the AI model will make a choice based on context — often defaulting to a neutral or slightly formal register. But you can be explicit in your system prompt:

"When replying in Spanish, use the formal usted form. When replying in French, use vous."

Or, if your brand is conversational:

"When replying in Spanish, use the informal tu form — keep the tone friendly and relaxed."

Getting the register right matters for brand perception. A luxury brand using tu in Spanish might feel too casual. A youth-focused brand using usted might feel stiff and corporate.

How to test your multilingual bot

Before you launch, test your agent with messages in each target language. Specifically:

Test language detection — send messages in each language you expect to serve and confirm the bot replies in the same language. Pay attention to short messages where language might be ambiguous ("ok", "yes", "hi" could be any language).

Test code-switching — some customers mix languages in a single message (common in bilingual communities). Send a message that mixes English and Spanish, or French and Arabic, and see how the bot handles it. Ideally, it picks the dominant language of the message.

Test edge cases — misspellings, transliterations (typing in the Latin alphabet instead of Arabic or Hindi script), and messages with emojis instead of words. These are all real patterns in WhatsApp communication.

Test formality — if you've specified a register, confirm the bot consistently uses it across different message types and conversation lengths.

Building with CodeWords

When you build a multilingual bot with CodeWords, the language detection is handled by the AI model included in the platform. You don't need to bring your own translation API or set up additional services.

Describe your use case to Cody in English — "I want a customer support bot that responds in whatever language the customer uses" — and Cody builds a multilingual agent automatically. You can then test it in your target languages and refine the system prompt if needed.

For businesses operating in specific regions, CodeWords also has industry pages with templates for common use cases: dental practices, aesthetics clinics, accounting firms, and more.


Related reading

Get started today

Your first agent is free to build.

Describe what you need. Cody handles the build, the connections, and the deployment.