# Languages

Ask for names and labels in your language with lang, on any request.

## The parameter

Add `lang` to any request. Left out, the answer is in English.

**Request**

```bash
curl "https://autospec.launchit.ro/v1/models?make=mercedes-benz&q=class&lang=de" \
  -H "X-API-Key: as_live_your_key"
```

| `lang` | Language |
|---|---|
| `en` | English |
| `bg` | Български |
| `bs` | Bosanski |
| `cnr` | Crnogorski |
| `cs` | Čeština |
| `da` | Dansk |
| `de` | Deutsch |
| `el` | Ελληνικά |
| `es` | Español |
| `fr` | Français |
| `hr` | Hrvatski |
| `hu` | Magyar |
| `it` | Italiano |
| `nl` | Nederlands |
| `pl` | Polski |
| `pt` | Português |
| `ro` | Română |
| `sk` | Slovenčina |
| `sl` | Slovenščina |
| `sr` | Srpski |

A code that is not in the list is a `400`.

## What is translated

The catalogue is stored in English. What can be said in another language is put into it as the answer is built:

| | English | `lang=de` | `lang=ro` |
|---|---|---|---|
| Model names with an ordinary word | E-class | E-Klasse | Clasa E |
| | 5 Series | 5er | Seria 5 |
| Generation names | Sedan (B9 8W, facelift 2019) | Limousine (B9 8W, Facelift 2019) | Sedan (B9 8W, facelift 2019) |
| | II Double Cab | II Doppelkabine | II Cabină Dublă |
| Version names | 2.0 TDI (150 Hp) Automatic | 2.0 TDI (150 PS) Automatik | 2.0 TDI (150 CP) Automată |
| A motorcycle still built | 2025 on | ab 2025 | din 2025 |
| Vocabulary labels | Station wagon, Petrol | Kombi, Benzin | Break, Benzină |

The examples show the idea. The exact wording is whatever each language's catalogue holds.

`name` is translated wherever it appears: on models, generations and versions, in the `make`, `model` and `generation` references inside them, and in the flat shape. Labels are translated in [vocabularies](https://autospec.launchit.ro/docs/vocabularies).

## What is not

- **A maker's own names.** Golf, Avant, Stepway, quattro, TDI and Tiptronic are the same in every language.
- **Values.** `body` is still `sedan` and `fuel` is still `petrol`. Only labels change, so filters, sorting and your own code work the same in every language.
- **Slugs, paths and ids.** A path is `mercedes-benz/e-class` whatever the language.
- **Search.** `q` matches the English name, so `q=class` finds the E-class under `lang=de`, and `q=klasse` does not.
- **Notes**, and the labels in the [change feed](https://autospec.launchit.ro/docs/changes).

## The languages, from the API

`GET /v1/languages`

Returns the codes above with each language's own name, for a language picker.

## Building your own labels

`GET /v1/translations?lang=de`

If you put a label together yourself from a generation's parts (see [generations](https://autospec.launchit.ro/docs/generations)), this gives you the words to do it with in one language: the word for a facelift, and patterns such as `{}-door` and `{} on`, with `{}` where the number goes.

**Response**

```json
{
  "language": "de",
  "name": "Deutsch",
  "terms": { "facelift": "Facelift", "doors": "{}-türig", "onwards": "ab {}", "hp": "PS" },
  "phrases": { "long": "Lang", "double_cab": "Doppelkabine", "automatic": "Automatik" }
}
```

The example is shortened. Body types and the other closed lists are in [vocabularies](https://autospec.launchit.ro/docs/vocabularies) with the same `lang`.
