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

# Localization

Every text players see can be translated: all desktop apps, the document cards, notifications and server messages.

Included languages: **English** (`en`) and **German** (`de`). Switch with `Config.Locale = 'de'`.

A language consists of two files with the same code:

| File | Contains |
| - | - |
| `locales/ui/<code>.json` | Everything inside the PC: app names, buttons, dialogs, the built-in websites and news articles, games, document cards, date and money format. |
| `locales/<code>.lua` | Messages from the server and client scripts: success and error messages, notifications, phone texts, bank transaction texts, the treasury ledger. |

1.

Copy `locales/ui/en.json` to `locales/ui/de.json` and translate the values. Keep the keys and the `{placeholders}`. 2.

Copy `locales/en.lua` to `locales/de.lua`, change `Locale['en']` to `Locale['de']` and translate the values. Keep the keys and the `%s` / `%d` placeholders in the same order. 3.

Set `Config.Locale = 'de'` in `config/config.lua` and restart the resource. No rebuild is needed.

```json theme={null}
{
  "meta": {
    "language": "Deutsch",
    "dateLocale": "de-CH",
    "currency": "{amount} CHF"
  },
  "bills": {
    "pay": "{amount} bezahlen",
    "tabHistory": "Verlauf"
  }
}
```

```lua theme={null}
Locale['de'] = {
    ['common_invalid_request'] = 'Ungültige Anfrage.',
    ['not_at_cityhall']        = 'Das geht nur im Rathaus.',
    -- …
}
```

## Date and money format

| Key | Example | Effect |
| - | - | - |
| `meta.dateLocale` | `"de-CH"` | Language tag for dates, times and number separators. Empty uses the game's language. |
| `meta.currency` | `"{amount} CHF"` | How money is shown in the PC. `{amount}` is the formatted number. |

Money in server messages (`locales/<code>.lua`) is written as `$%s`. Change the `$` there too if your server uses another currency.

> [!NOTE]
>
> You don't have to translate everything at once: any key missing from your files falls back to English. The UI's English texts are also built into the interface, so even an empty `de.json` works.
>
> Lists, such as the typing test sentences (`games.typing.sentences`), the Command Prompt help and the news articles (`web.news.articles`), can be translated like any other value.

> [!WARNING]
>
> The JSON file must stay valid JSON (double quotes, no trailing commas). If it can't be read, the console shows `locales/ui/de.json is not valid JSON` and the PC uses English. Content from the config files (license names and questions, document types, job names, categories, phone texts) is translated in those config files.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.