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

# Language

> Every player-facing string lives in locales/ - translate or reword the whole pack by editing a file, no build step.

Every word a player sees - game titles, subtitles, the "How to play" rules, and every stamp, chip and hint inside a game - lives in the `locales/` folder. One file per language. Editing them needs **no build, no Node, no npm**: change a value, restart the resource.

<Info>
  These files stay **open** under asset escrow, exactly like the themes. Translating or rewording the pack is something you do yourself, on your own server.
</Info>

## Pick a language

Set it once in `config.lua`:

```lua config.lua theme={"dark"}
language = 'es',
```

The pack ships with these built in:

| Id   | Language         |   | Id   | Language   |
| ---- | ---------------- | - | ---- | ---------- |
| `en` | English (source) |   | `it` | Italiano   |
| `es` | Español          |   | `nl` | Nederlands |
| `fr` | Français         |   | `pl` | Polski     |
| `de` | Deutsch          |   | `sv` | Svenska    |
| `pt` | Português (BR)   |   | `tr` | Türkçe     |
| `cs` | Čeština          |   |      |            |

Each is a file in `locales/` - `locales/es.lua`, `locales/fr.lua`, and so on. `locales/en.lua` is the complete source every other file is layered over.

## Reword the English

You don't have to translate anything to change wording. Open `locales/en.lua`, edit the strings you want, restart:

```lua locales/en.lua theme={"dark"}
AwokenMinigamesLocales['en'] = {
    games = {
        hexBreach = { title = 'ICE Breaker' },   -- was 'Hex Breach'
    },
    ui = {
        skillCheck = { success = 'GOT IT' },      -- was 'BREACH SUCCESSFUL'
    },
}
```

Overrides are layered **per string**, so anything you don't touch keeps working. You can delete every key you aren't changing - a missing key means "keep the default", not "show nothing".

## Add a language

<Steps>
  <Step title="Copy the English file">
    Duplicate `locales/en.lua` to `locales/<id>.lua`, e.g. `locales/da.lua` for Danish.
  </Step>

  <Step title="Change the id on the assignment line">
    ```lua locales/da.lua theme={"dark"}
    AwokenMinigamesLocales['da'] = {
        -- ...
    }
    ```
  </Step>

  <Step title="Translate the values">
    Translate only the strings inside the quotes. Leave anything you haven't got to - it falls back to English.
  </Step>

  <Step title="Select it and restart">
    ```lua config.lua theme={"dark"}
    language = 'da',
    ```

    `restart awoken_minigames`.
  </Step>
</Steps>

## The two sections

Each language file has two parts:

| Section      | What it holds                                                                                                                            |
| ------------ | ---------------------------------------------------------------------------------------------------------------------------------------- |
| `games.<id>` | The card heading (`title`, `subtitle`), the dev-menu blurb (`description`), and the `howToPlay` bullets behind the "How to play" toggle. |
| `ui.<id>`    | The micro-copy inside that game: win/lose stamps, chip labels, hints, prompts.                                                           |

The game names are the export names written lower-case-first - `skillCheck`, `hexBreach`, `towerOfHanoi`. Three sections aren't games: `common` (the ESC hint), `startScreen`, and `sequence` (the stage banner).

<Warning>
  **Keep every `{...}` placeholder.** A string like `'Press [{k}] in the zone'` has `{k}` swapped for the real key at runtime. Move it around the sentence as grammar needs, but never rename or drop it, or the player sees the literal `{k}`.
</Warning>

<Tip>
  Prefer a per-call override for one-off copy. A single game's `title` and `subtitle` can be set right in the export call (`SkillCheck({ title = '...' })`), which always wins over the locale - handy when the same game is a bank hack in one job and a lab puzzle in another. Use the locale files for pack-wide wording and translations.
</Tip>

<Info>
  `locales/en.lua` is generated from the source, so a re-generate overwrites it. If you are keeping reworded English, work in a copy under another language id (e.g. `locales/mine.lua` with `AwokenMinigamesLocales['mine']` and `language = 'mine'`) and it will never be touched.
</Info>
