> For the complete documentation index, see [llms.txt](https://organized-chaos.gitbook.io/organized-chaos-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://organized-chaos.gitbook.io/organized-chaos-docs/the-lost-treasure/language.md).

# Language

Translate The Lost Treasure, fully or one line at a time.

The words are in two files:

| File                        | Holds                                                                                                     |
| --------------------------- | --------------------------------------------------------------------------------------------------------- |
| `config/locales.lua`        | The few words the client prints itself (`client`)                                                         |
| `config/server/locales.lua` | Everything else: the server's messages (`server`), the interface (`ui`) and the staff dashboard (`admin`) |

The resource ships in English.

## Translating

Add your language to both files and set `Config.Locale`:

```lua
-- config/locales.lua
Locales['de'] = Locales['de'] or {}
Locales['de'].client = { machineLabel = 'den Automaten' }
Config.Locale = 'de'

-- config/server/locales.lua
Locales['de'] = Locales['de'] or {}
Locales['de'].server = { unavailable = 'Das Casino ist derzeit nicht verfügbar.' }
Locales['de'].ui     = { spin = 'Drehen', credits = 'Guthaben' }
```

Every word on the game screen comes from here, including the feature screens and the rules under the paytable.

{% hint style="success" %}
Only the keys you translate are needed. Anything missing falls back to English, so a partial translation is safe.
{% endhint %}

## Placeholders

Text in `{braces}` is filled in while the game runs. Keep every placeholder a line already has, spelled exactly as it is, but put it wherever your sentence needs it.

`{brand}` is filled in from `Config.Branding.Name`, so renaming the machine never means translating anything again.

## Typos

At every start the resource checks your language against English and prints any key that does not exist there, which is almost always a typo. A key that is found in neither shows on screen as the key itself.
