> ## Documentation Index
> Fetch the complete documentation index at: https://docs.cekura.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Multilingual Testing

> Test your voice AI agent across multiple languages and code-switching scenarios.

export const CopyPageButton = () => {
  if (typeof window !== 'undefined') {
    setTimeout(function () {
      if (document.getElementById('ck-tools')) return;
      var anchor = document.getElementById('content-area') || document.querySelector('.mdx-content');
      if (!anchor) return;
      if (!document.getElementById('ck-style')) {
        var s = document.createElement('style');
        s.id = 'ck-style';
        s.textContent = '#ck-tools{position:absolute;top:6px;right:0;z-index:100;font-family:inherit;}' + '.ck-row{display:inline-flex;align-items:stretch;border:1px solid rgba(0,0,0,0.15);border-radius:8px;overflow:hidden;background:#fff;}' + ':root.dark .ck-row{background:rgba(255,255,255,0.06);border-color:rgba(255,255,255,0.12);}' + '.ck-btn{padding:5px 12px;border:none;background:none;cursor:pointer;font-size:13px;font-weight:500;font-family:inherit;color:#374151;}' + ':root.dark .ck-btn{color:#d1d5db;}' + '.ck-btn:hover{background:rgba(0,0,0,0.04);}' + ':root.dark .ck-btn:hover{background:rgba(255,255,255,0.06);}' + '.ck-chevron{padding:5px 8px;border:none;background:none;cursor:pointer;font-size:14px;font-family:inherit;color:#374151;}' + ':root.dark .ck-chevron{color:#d1d5db;}' + '.ck-chevron:hover{background:rgba(0,0,0,0.04);}' + ':root.dark .ck-chevron:hover{background:rgba(255,255,255,0.06);}' + '.ck-divider{width:1px;background:rgba(0,0,0,0.12);flex-shrink:0;}' + ':root.dark .ck-divider{background:rgba(255,255,255,0.12);}' + '.ck-dd{position:absolute;top:calc(100% + 4px);right:0;min-width:180px;background:#fff;border:1px solid rgba(0,0,0,0.12);border-radius:8px;box-shadow:0 4px 12px rgba(0,0,0,0.1);padding:4px;display:none;z-index:200;}' + ':root.dark .ck-dd{background:#1f2937;border-color:rgba(255,255,255,0.1);box-shadow:0 4px 16px rgba(0,0,0,0.35);}' + '.ck-item{display:block;width:100%;padding:7px 12px;border:none;background:none;border-radius:6px;cursor:pointer;font-size:13px;font-family:inherit;text-align:left;color:#374151;}' + ':root.dark .ck-item{color:#d1d5db;}' + '.ck-item:hover{background:rgba(0,0,0,0.05);}' + ':root.dark .ck-item:hover{background:rgba(255,255,255,0.07);}';
        document.head.appendChild(s);
      }
      var wrap = document.createElement('div');
      wrap.id = 'ck-tools';
      var row = document.createElement('div');
      row.className = 'ck-row';
      var mainBtn = document.createElement('button');
      mainBtn.className = 'ck-btn';
      mainBtn.textContent = 'Copy page';
      var divider = document.createElement('span');
      divider.className = 'ck-divider';
      var chevron = document.createElement('button');
      chevron.className = 'ck-chevron';
      chevron.textContent = '▾';
      var dd = document.createElement('div');
      dd.className = 'ck-dd';
      function closeDD() {
        dd.style.display = 'none';
      }
      function openDD() {
        dd.style.display = 'block';
      }
      chevron.onclick = function (e) {
        e.stopPropagation();
        if (dd.style.display === 'block') {
          closeDD();
        } else {
          openDD();
        }
      };
      document.addEventListener('click', function (e) {
        if (!e.target.closest('#ck-tools')) {
          closeDD();
        }
      });
      document.addEventListener('keydown', function (e) {
        if (e.key === 'Escape') {
          closeDD();
        }
      });
      function makeItem(label, fn) {
        var b = document.createElement('button');
        b.className = 'ck-item';
        b.textContent = label;
        b.onclick = function () {
          fn();
          closeDD();
        };
        return b;
      }
      function getMarkdown() {
        var walk = function (node) {
          if (!node) return '';
          if (node.nodeType === 3) return node.textContent || '';
          if (node.nodeType !== 1) return '';
          var tag = node.tagName.toLowerCase();
          var skip = ['script', 'style', 'svg', 'noscript', 'button', 'iframe'];
          if (skip.indexOf(tag) !== -1) return '';
          if (node.id === 'ck-tools') return '';
          var ch = Array.from(node.childNodes).map(walk).join('');
          if (tag === 'h1') return '\n# ' + ch.trim() + '\n\n';
          if (tag === 'h2') return '\n## ' + ch.trim() + '\n\n';
          if (tag === 'h3') return '\n### ' + ch.trim() + '\n\n';
          if (tag === 'p') return '\n' + ch.trim() + '\n\n';
          if (tag === 'pre') return '\n```\n' + node.textContent.trim() + '\n```\n\n';
          if (tag === 'li') return '- ' + ch.trim() + '\n';
          if (tag === 'code') return '`' + ch.trim() + '`';
          return ch;
        };
        var content = document.querySelector('.mdx-content') || document.getElementById('content-area') || document.body;
        return walk(content).replace(/\n\n\n+/g, '\n\n').trim();
      }
      function copyMd() {
        var md = getMarkdown();
        navigator.clipboard.writeText(md).then(function () {
          mainBtn.textContent = 'Copied!';
          setTimeout(function () {
            mainBtn.textContent = 'Copy page';
          }, 2000);
        });
      }
      function viewMd() {
        var md = getMarkdown();
        var safe = md.split('&').join('&amp;').split('<').join('&lt;').split('>').join('&gt;');
        var html = '<!DOCTYPE html><html><head><meta charset="utf-8"><style>body{font-family:monospace;max-width:860px;margin:40px auto;padding:0 24px;line-height:1.7;white-space:pre-wrap;word-wrap:break-word}</style></head><body>' + safe + '</body></html>';
        window.open(URL.createObjectURL(new Blob([html], {
          type: 'text/html'
        })), '_blank');
      }
      function openClaude() {
        var prompt = 'Can you read this Cekura docs page ' + window.location.href + ' so I can ask you questions?';
        window.open('https://claude.ai/new?q=' + encodeURIComponent(prompt), '_blank');
      }
      mainBtn.onclick = copyMd;
      dd.appendChild(makeItem('Copy page', copyMd));
      dd.appendChild(makeItem('View as Markdown', viewMd));
      dd.appendChild(makeItem('Open in Claude', openClaude));
      row.appendChild(mainBtn);
      row.appendChild(divider);
      row.appendChild(chevron);
      wrap.appendChild(row);
      wrap.appendChild(dd);
      anchor.style.position = 'relative';
      anchor.insertBefore(wrap, anchor.firstChild);
    }, 50);
  }
  return null;
};

<CopyPageButton />

## Overview

If your agent serves users in more than one language — or handles code-switching (e.g. Spanglish, Hinglish) — you can't rely on English-only tests to tell you whether it actually works. Multilingual testing on Cekura uses language-specific **personalities** to drive evaluators in the target language and surface issues that only show up outside English, like:

* ASR (speech-to-text) mis-transcriptions on non-English audio
* TTS (text-to-speech) pronouncing names or numbers incorrectly in the target language
* The agent silently falling back to English mid-conversation
* Workflow metrics passing in one language but failing in another

## How It Works

Multilingual testing is driven by two primitives:

1. **Personalities** — each personality has a configured language (and optionally a pace). The evaluator speaks to your agent using that personality, in that language.
2. **Per-language evaluator runs** — the same evaluator can be run against multiple personalities to test whether your agent handles the same workflow identically across languages.

See the [Personality](/documentation/key-concepts/evaluators/personality) docs for the full list of configuration options, and [Creating Custom Personalities](/documentation/advanced/creating-custom-personalities) for how to add a new language to the default set.

## Running a Multilingual Test

<Steps>
  <Step title="Confirm your agent supports the target languages">
    Check your agent's STT, LLM, and TTS configuration for each language you want to test. A common failure mode is that the LLM prompt is multilingual but the STT is locked to `en-US` — the agent will never "hear" the non-English turns correctly.
  </Step>

  <Step title="Pick or create a personality per language">
    Use a built-in personality (e.g. `Spanglish`) or create a [custom personality](/documentation/advanced/creating-custom-personalities) for the specific language you want to test.

    Common patterns:

    * **Pure target language** — caller speaks only Spanish for the whole call
    * **Code-switching** — caller mixes English and the target language within sentences
  </Step>

  <Step title="Attach the personality to your evaluators">
    You have two options — pick whichever fits your workflow:

    * **Duplicate the evaluator per language** — take an evaluator that already passes in English, duplicate it, and assign the language-specific personality to each copy. Good when you want the per-language variants saved as distinct evaluators you can re-run independently.
    * **Override personality at runtime** — keep a single evaluator and override the personality when you run it. On the evaluators page, select the evaluators you want to run and use the **Override Personality** option to pick one or more personalities for this run. Cekura executes each selected evaluator against every selected personality. Good when you want to sweep the same workflow across many languages without creating N copies.

    Either way, keep the **scenario instructions** and **expected outcomes** identical so you're measuring the same workflow across languages.
  </Step>

  <Step title="Run and compare per language">
    Run each language's evaluator set and compare pass rates side-by-side. Use the [A/B Testing](/documentation/guides/testing-agents/ab-testing) compare view to diff two language runs of the same evaluator.
  </Step>
</Steps>

## What to Watch For

| Symptom                                                          | Likely Cause                                                                      |
| ---------------------------------------------------------------- | --------------------------------------------------------------------------------- |
| Expected outcome fails, transcript looks garbled                 | STT not configured for the target language                                        |
| Agent responds in English even though caller is speaking Spanish | LLM prompt isn't instructing the agent to mirror the caller's language            |
| Names, dates, or numbers sound wrong on playback                 | TTS voice or language setting mismatched                                          |
| Works in pure Spanish but fails on code-switching                | Agent is language-locking on first turn; prompt needs to handle mid-call switches |

## Best Practices

### Hold the Workflow Constant, Vary the Language

When isolating language-related issues, keep scenario instructions and expected outcomes identical across language variants. If you change the workflow and the language at the same time, you won't know which one caused a regression.

### Test the Seams, Not Just the Middle

Most multilingual bugs live at transitions: the opening turn (before language is established), the handoff to a tool call, and the farewell. Make sure your evaluators exercise all three.

### Include Code-Switching Explicitly

Many real users mix languages. If your product is used in markets where this is common, add at least one code-switching personality per language pair — don't assume pure-language tests cover it.

### Measure Per Language, Not Just Overall

A 90% pass rate that's 99% in English and 70% in Spanish is hiding a real problem. Break down results per personality (and therefore per language) rather than relying on the aggregate number.

## Related Resources

* [Personality](/documentation/key-concepts/evaluators/personality) — How personalities control language and behavior
* [Creating Custom Personalities](/documentation/advanced/creating-custom-personalities) — Add a new language
* [A/B Testing](/documentation/guides/testing-agents/ab-testing) — Compare per-language runs side-by-side
* [Accent Testing](/documentation/guides/testing-agents/accent-testing) — Testing within the same language across regional or non-native accent variants
* [Testing Overview](/documentation/guides/testing-agents/overview) — Basic testing flow
