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

# Multilingual

> Build AI voice agents that speak multiple languages

RevRing supports AI voice agents in 20+ languages, enabling you to serve customers globally with natural-sounding voices in their native language.

## Supported Languages

RevRing offers 300+ voices across the following languages:

* **English** (en)
* **Spanish** (es)
* **Italian** (it)
* **German** (de)
* **Portuguese** (pt)
* **Turkish** (tr)
* **Japanese** (ja)
* **Hindi** (hi)
* **Dutch** (nl)
* **Chinese** (zh)
* **Greek** (el)
* **Ukrainian** (uk)
* **Arabic** (ar)
* **Danish** (da)
* **Estonian** (et)
* **Finnish** (fi)
* **Norwegian** (nb, no)
* **Swedish** (sv)
* **Vietnamese** (vi)

<Note>
  **Voice Flexibility:** Any voice can be used with any language setting. For example, you can use a Spanish-labeled voice on an English-language agent to achieve a Spanish accent, or mix and match voices and languages to create the exact speaking style you need.
</Note>

## Setting Agent Language

### Via Dashboard

1. Navigate to [Agents](https://dashboard.revring.ai/app/agents) and select your agent
2. Go to the **Overview** tab
3. Select your desired **Language** from the dropdown and click **Save**
4. Go to the **Voice** tab
5. Choose a **Voice** that matches your selected language
6. Click **Save Voice**

You can preview all available voices in the [Voice Library](https://dashboard.revring.ai/app/agents/voices).

### Via API

Set the language when creating or updating an agent:

```bash theme={null}
curl -X PATCH https://api.revring.ai/v1/agents/agent_123abc \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "language": "es",
    "voiceId": "revring-rafael"
  }'
```

**Supported language codes:**

* `en` (English)
* `es` (Spanish)
* `pt` (Portuguese)
* `de` (German)
* `it` (Italian)
* `nl` (Dutch)
* `zh` (Chinese)
* `ja` (Japanese)
* `hi` (Hindi)
* `tr` (Turkish)
* `el` (Greek)
* `uk` (Ukrainian)
* `ar` (Arabic)
* `da` (Danish)
* `et` (Estonian)
* `fi` (Finnish)
* `nb` (Norwegian Bokmål)
* `no` (Norwegian)
* `sv` (Swedish)
* `vi` (Vietnamese)

## Writing Prompts for Multilingual Agents

### Best Practice: Match Prompt Language

For optimal performance, write your agent's prompt in the same language as the agent's configured language setting:

**Spanish Agent Example:**

```
Eres un asistente de servicio al cliente profesional y amigable.

INSTRUCCIONES:
- Saluda a los clientes calurosamente
- Responde preguntas sobre nuestros productos
- Mantén las respuestas concisas y útiles

Siempre sé cortés y profesional.
```

### Cross-Language Prompts

While not required, agents can follow prompts written in a different language than their speaking language. The AI is intelligent enough to understand instructions in one language while conversing in another:

**English Prompt for Spanish Agent:**

```
You are a customer service agent speaking Spanish.

INSTRUCTIONS:
- Greet customers warmly in Spanish
- Answer questions about our products
- Keep responses under 30 seconds

Always be polite and professional.
```

However, for best results and consistency, we recommend writing prompts in the agent's configured language.

## Language System Variable

The `{{language}}` system variable is automatically available in all prompts and contains the agent's language code:

```
You are speaking in {{language}}.

Current language: {{language}}
Timezone: {{timezone}}
Current time: {{current_time}}
```

This can be useful for building flexible prompts or logging purposes.

## Voice Selection

Each language has multiple voices to choose from. Visit the [Voice Library](https://dashboard.revring.ai/app/agents/voices) to preview all available voices in your selected language.

### Backup Voice

Every agent can set a **Backup Voice** (in the dashboard Voice tab, or `fallbackVoiceId` via the API) for seamless voice continuity. In the rare case a voice is temporarily unavailable, the agent switches to its backup voice instantly and the conversation continues as normal. Leave it on **Automatic** to let the platform manage this for you. For multilingual agents we recommend choosing a backup voice in the agent's own language.

### English Voice Categories

English offers two categories of voices:

* **English Ultra-Realistic (Beta)**: Cutting-edge voices with exceptional naturalness and expressiveness
* **English Stable**: Reliable, production-ready voices with consistent performance

If you experience instability with Ultra-Realistic voices, try switching to an **English Stable** voice for better reliability.

## Troubleshooting

### Voice Instability

If you notice inconsistent voice quality or unexpected behavior:

1. **Switch Voice Category**: For English agents, try switching from Ultra-Realistic to Stable voices
2. **Verify Language Match**: Ensure the selected voice matches your agent's language setting

### Need Help?

For assistance with multilingual setup, voice selection, or configuration, contact support.

Our team can help you:

* Choose the right voices for your use case
* Optimize prompts for specific languages
* Configure multilingual routing strategies
* Troubleshoot voice quality issues

## Complete Example

Here's a complete Spanish agent configuration:

**Via API:**

```bash theme={null}
curl -X POST https://api.revring.ai/v1/agents \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "sipTrunkId": "trunk_abc123",
    "name": "Asistente en Español",
    "language": "es",
    "voiceId": "revring-rafael",
    "promptTemplate": "Eres un asistente de servicio al cliente. Ayuda al cliente con sus preguntas.",
    "firstMessage": "Hola, bienvenido. ¿Cómo puedo ayudarte hoy?"
  }'
```

**Via Dashboard:**

1. Create agent with name "Asistente en Español"
2. In **Overview** tab:
   * Language: Spanish
   * First Message: "Hola, bienvenido. ¿Cómo puedo ayudarte hoy?"
   * Prompt: "Eres un asistente de servicio al cliente. Ayuda al cliente con sus preguntas."
3. In **Voice** tab:
   * Voice: Rafael

<Tip>
  For businesses serving multiple language markets, create separate agents for each language rather than trying to make a single agent multilingual. This ensures the best voice quality and conversation experience.
</Tip>
