> 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-gang/translation/languages.md).

# Languages

Switch CAS Advanced Gang System between English, German, French and Turkish: one locale table for server, client and interface, and money formatting.

```lua
Config.Locale = 'de'
```

One setting changes the whole resource: console lines, notices, ledger notes, the record, the bell prompt and every panel of the interface.

| Code | Language                   |
| ---- | -------------------------- |
| `en` | English, also the fallback |
| `de` | German                     |
| `fr` | French                     |
| `tr` | Turkish                    |

## One table for everything

Every line lives in `locales/<code>.lua`, keyed by name. The server and the client read it, and when the ledger opens, the client sends the same table to the interface. The interface is translated by the same file as the server, not by a second copy that drifts.

| Prefix   | Used for                                      |
| -------- | --------------------------------------------- |
| `title.` | Notice titles                                 |
| `msg.`   | Notices and refusals                          |
| `note.`  | Ledger notes and record entries               |
| `word.`  | Short words reused in sentences               |
| `deed.`  | Tier challenge labels                         |
| `place.` | The placing tool                              |
| `guide.` | Guided placement                              |
| `fmt.`   | Money formatting                              |
| `ui.`    | Every label, button and text in the interface |

## Money formatting

Money reaches every message as one ready-made `%s`. Three keys at the top of each file decide how it reads:

```lua
['fmt.money']     = '%s $',  -- where the sign goes; %s is the number, already grouped
['fmt.thousands'] = '.',     -- thousands separator
['fmt.decimal']   = ',',     -- decimal separator
```

| Locale | 1250 reads as |
| ------ | ------------- |
| `en`   | `$1,250.00`   |
| `de`   | `1.250,00 $`  |
| `fr`   | `$1 250,00`   |
| `tr`   | `$1.250,00`   |

## Not in the locale files

These live in `config.lua`, so write them in your server's language there:

* tier names, blurbs, purposes and unlock lists,
* structure names and descriptions,
* stash item labels and categories,
* rank names (the defaults for new gangs),
* the ledger prompt label and the map blip label.

If you rename the stash categories, point `Config.StashWeaponCategory` and `Config.StashOtherCategory` at the new names.
