# Languages and offline docs

Elide prints its messages and its built-in documentation in your language, and the whole manual ships inside the
binary, so `elide help` works without a network connection.

## Languages

| Language | Code | CLI messages | `elide help` | elide.help |
| --- | --- | --- | --- | --- |
| English | `en` | Yes | Yes | Yes |
| French | `fr` | Yes | Yes | Yes |
| German | `de` | Yes | Yes | Yes |
| Russian | `ru` | Yes | Yes | Yes |
| Spanish | `es` | Yes | Yes | Yes |
| Ukrainian | `uk` | Yes | Yes | Yes |
| Arabic | `ar` | Yes | English | Yes |
| Chinese (Simplified) | `zh` | Yes | English | English |

A message or page without a translation appears in English. Output from your own programs is never changed.

## Choose a language

Elide uses the first of these that names a language it has:

1. The `--locale` flag, on any command.
2. The `ELIDE_LOCALE` environment variable.
3. `LANGUAGE` (a colon-separated list), then `LC_ALL`, `LC_MESSAGES` and `LANG`.
4. The operating system's language settings.
5. English.

On Windows, Elide reads the system language instead of `LANGUAGE`, `LC_ALL`, `LC_MESSAGES` and `LANG`.

```bash
elide --locale fr --help
ELIDE_LOCALE=de elide build
LANG=uk_UA.UTF-8 elide help
LANGUAGE=ja:es elide --help   # no Japanese, so Spanish
```

Tags take any common form: `fr`, `fr-FR`, `fr_FR` and `fr_FR.UTF-8` all select French. `C` and `POSIX` are skipped.

## Read the docs offline

Every page in this site's navigation is built into the `elide` binary, in each `elide help` language.

```bash
elide help                       # browse and search in the terminal
elide help installation          # open a page by slug or title
elide help run                   # a command's reference
elide help --lang de projects    # one page in another language
elide help --languages           # list the languages
```

`--lang` changes the language of the docs only; `--locale` changes every message. Each page on this site shows the
`elide help` command that opens it, under **Read offline**.

In a pipe, a script or an agent, `elide help` prints Markdown instead of opening the browser. Force it with
`--format markdown`:

```bash
elide help --format markdown                         # every page, as an index
elide help --format markdown tooling-dependencies > deps.md
elide agent help http-service                        # the same, for agents
```

The keys of the terminal browser are listed under [`elide help`](/docs/cli-references#help).

## On the web

[elide.help](https://elide.help) is published in English, Español, Deutsch, Français, Русский, Українська and
العربية. Pick a language from the language menu in the header; English pages at `/docs/…` live at `/fr/docs/…`,
`/de/docs/…` and so on in other languages, and Arabic pages read right to left. When your browser prefers a
published language, English pages offer a one-line link to it; the site never redirects you. A page without a
translation shows the English text.

Agents and scripts read any page as Markdown by appending `.md` to its URL; see
[/developers](https://elide.help/developers).
