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

# Localization

> Request localized SpaPortal API fields.

SpaPortal stores selected text fields in multiple locales.

Send `Accept-Language` to choose the localized values you want:

```bash theme={null}
curl \
  -H "X-SpaPortal-Public-Key: <your_public_key>" \
  -H "Accept-Language: cs-CZ,de-DE,en" \
  "https://spaportal.cz/api/v2/room-types"
```

API v2 accepts BCP 47 language tags in requests. Supported response locale keys
are `cs-CZ`, `de`, `en`, and `ru`.

Regional request tags are matched to the closest supported locale. For example,
`de-DE` and `de-AT` both return localized fields under `de`.

Localized response fields are objects keyed by supported response locale:

```json theme={null}
{
  "category": {
    "cs-CZ": "Superior dvoulůžkový pokoj",
    "de": "Superior Doppelzimmer"
  }
}
```

The response includes `Content-Language` with the locale tags returned.

## Language ranges

Use these request values to select localized fields:

| Header value           | Meaning                    |
| ---------------------- | -------------------------- |
| `cs`, `cs-CZ`          | Czech, returned as `cs-CZ` |
| `de`, `de-DE`, `de-AT` | German, returned as `de`   |
| `en`, `en-US`, `en-GB` | English, returned as `en`  |
| `ru`, `ru-RU`          | Russian, returned as `ru`  |

Quality values (`;q=`) order the returned keys. Tags with `q=0` are ignored.

When `Accept-Language` is omitted, the API returns all supported locale keys for
that field. When the header contains only unsupported languages, the API returns
`cs-CZ`.

## Missing translations

A requested key is always present in a localized field. When a translation is
missing or empty, its value is `null` — the API never returns an empty string.

The hotel `name` is the one exception: a missing translation falls back to the
Czech value, so `name` values are never `null`.
