Supported language codes
Još nije prevedeno — prikazano na engleskom.
The list below is maintained in one place and served by GET /v1/languages. Query the endpoint from your build or deployment scripts rather than copying the table; the endpoint is what the validator uses.
Fetching the list
curl "https://api.langapi.xyz/v1/languages?type=target" \
-H "Authorization: Bearer la_live_xxxxxxxx"
type accepts source or target. When it is omitted, source is assumed; any other value answers 400 with validation_error.
Source entries carry a code and a name. Target entries add the supports_formality flag:
[
{ "language": "BG", "name": "Bulgarian", "supports_formality": true },
{ "language": "BS", "name": "Bosnian", "supports_formality": true },
{ "language": "CA", "name": "Catalan", "supports_formality": true }
]
The target list is sorted by code.
Source codes
Thirty-six base codes are accepted as source_lang:
| Codes | Languages |
|---|---|
BG BS CA CS DA DE EL EN ES | Bulgarian, Bosnian, Catalan, Czech, Danish, German, Greek, English, Spanish |
ET EU FI FR GA GL HR HU IS | Estonian, Basque, Finnish, French, Irish, Galician, Croatian, Hungarian, Icelandic |
IT LT LV MK MT NB NL PL PT | Italian, Lithuanian, Latvian, Macedonian, Maltese, Norwegian Bokmål, Dutch, Polish, Portuguese |
RO RU SK SL SQ SR SV TR UK | Romanian, Russian, Slovak, Slovenian, Albanian, Serbian, Swedish, Turkish, Ukrainian |
A source is always a base code. EN-US or PT-BR as source_lang is rejected with invalid_source_lang.
Target codes and variants
The 38 targets are the 36 base codes with two substitutions: plain EN and PT are replaced by their regional variants.
| Variant | Meaning |
|---|---|
EN-GB | British English |
EN-US | American English |
PT-PT | European Portuguese |
PT-BR | Brazilian Portuguese |
Sending EN as a target resolves to EN-US; sending PT resolves to PT-PT. No other language has variants.
Normalisation
Before validation a code is trimmed, upper-cased and any underscore is turned into a hyphen. All of the following are accepted for Brazilian Portuguese:
PT-BR pt-br pt_BR Pt_Br
Automatic detection
If source_lang is absent, the engine determines the language and reports it as detected_source_language on every translation in the response. When you do send source_lang, that value is echoed back unchanged. For very short strings — a single word, a button label — detection has little to go on, so send the source code when you know it.
The formality flag
supports_formality is false for EN-GB, EN-US, GA, IS and MT and true everywhere else. Sending formality: "more" or "less" to one of the five is a validation_error; prefer_more and prefer_less are accepted for every target. Details are on Formality control.
Unknown codes
| Situation | Status | code |
|---|---|---|
target_lang is not in the target list | 400 | invalid_target_lang |
source_lang is not in the source list | 400 | invalid_source_lang |
target_lang missing entirely | 400 | validation_error |
The public language pairs overview shows the same list in a browsable form.
Revidirano 7. 9. 2026. 00:00