> For the complete documentation index, see [llms.txt](https://code-after-sex.gitbook.io/script-documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://code-after-sex.gitbook.io/script-documentation/cas-advanced-inventory/languages.md).

# Languages

Change the language of CAS Advanced Inventory or add your own. Shipped in English, Turkish, German, French, Spanish and Brazilian Portuguese.

Every text the players see, in the satchel and in game (notices, prompts, admin replies), comes from `locales/`.

| Code    | Language             |
| ------- | -------------------- |
| `en`    | English (default)    |
| `tr`    | Turkish              |
| `de`    | German               |
| `fr`    | French               |
| `es`    | Spanish              |
| `pt-br` | Brazilian Portuguese |

## Choosing one

```lua
Config.Locale = 'en'   -- config/config.lua
```

Restart the server after changing it: the satchel gets its texts when a player joins.

## Adding a language

1. Copy `locales/en.lua` to `locales/<code>.lua`.
2. Change the first table line to `Locales['<code>'] = {`.
3. Translate the texts on the right side. Keep the keys on the left as they are.
4. Set `Config.Locale = '<code>'`.

The manifest loads every file in `locales/`, nothing else to register.

## Rules for translators

* **Placeholders:** `%s` is filled in order. `{0}` and `{1}` are filled by position, so your language may change the word order. Keep every placeholder.
* **Case:** keys ending in `_c` are shown in capitals, keys ending in `_l` in normal case.
* **Length:** buttons and tabs sit in fixed boxes, keep those words short.
* **Missing keys are safe:** a key your file leaves out is shown in English, never as a raw key. You can translate a few texts and leave the rest.

Item names are not in these files: they come from your item table (`items` on VORP, `RSGShared.Items` on RSG).
