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

# Language Codes

> Language code format and accepted spellings for translation

Text translation and real-time translation identify languages with codes in the `<ISO 639-3>_<Script>` format: an ISO 639-3 language code, an underscore and an ISO 15924 script code, for example `eng_Latn`, `arb_Arab`, `zho_Hans` (Simplified Chinese) and `zho_Hant` (Traditional Chinese).

<Note>
  This format applies to translation only. Speech-to-Text and Text-to-Speech keep using locales such as `en-US`.
</Note>

## Accepted input

Language fields in requests also accept ISO 639-1 (`en`), ISO 639-3 (`eng`) and BCP 47 (`zh-Hans`, `pt-BR`) codes. Matching ignores letter case, and `-` and `_` are interchangeable. A region may select the script, so `zh-TW` becomes `zho_Hant`, and a few codes resolve to a specific language, so `ar` becomes `arb_Arab`.

To detect the source language automatically, omit `source_language` or set it to an empty string or `auto`.

A language the selected model does not support is rejected. [Get Model Details](/api-reference/models/get-model-details) returns each model's supported languages: `translate_capability.target_languages` for text translation models and `languages` for real-time translation models.

## Responses

| `source_language` in the request | `detected_source_language` in the response |
| -------------------------------- | ------------------------------------------ |
| Omitted, `""` or `auto`          | The detected language, e.g. `zho_Hans`     |
| Specified, e.g. `zh-TW`          | The value as sent, e.g. `zh-TW`            |

Languages determined by the service, such as detected languages and model language lists, use the `<ISO 639-3>_<Script>` format.

In real-time translation, the `ready` message and `translation.target_language` echo the languages you sent in `init`, while `transcript.language` and `translation.source_language` contain the detected language as a code. To compare the two, send your languages in the `<ISO 639-3>_<Script>` format.
