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

# Languages and Translation

Change the language of the RedM Wedding & Marriage System, add a new translation, change any text players see, and translate item names.

Every word the script shows comes from one language file in `locales/`: the interface, the documents, the prompts, the map marker, the notifications and the server messages. English (`en`) and Turkish (`tr`) are included.

## Choosing the language

```lua
Config.Locale = "en"   -- "en" or "tr"
```

The language is the same for every player on the server. Restart the resource after changing it.

## Adding a language

1. Copy `locales/en.lua` to a new file, for example `locales/de.lua`.
2. In the first lines, change `Locales['en']` to `Locales['de']`.
3. Translate the text on the right of each `=`. Leave the keys on the left as they are.
4. Set `Config.Locale = "de"` and restart.

The new file is loaded automatically. A line you leave out, or have not translated yet, falls back to English, so you can translate in stages.

The interface reads the same file, so there is nothing to rebuild.

## Placeholders

Some texts have gaps that the script fills in, written `%s`, or `%1$s`, `%2$s` when there are several:

```lua
proposal_compose_title = "Propose to %s",
booking_cancel_body = "You will be refunded %1$s of the %2$s you paid. The hour becomes free for other couples.",
```

Keep every placeholder in your translation. With numbered ones you can change their order to suit your language, as the Turkish file does:

```lua
booking_cancel_body = "Ödediğin %2$s tutarın %1$s kadarı sana iade edilecek. Bu saat diğer çiftler için yeniden boşa çıkar.",
```

## Singular and plural

Some texts come in two forms, `_one` and `_other`:

```lua
marriage_days_one = "%s day",
marriage_days_other = "%s days",
```

`_one` is used for exactly one, `_other` for everything else. Translate both, even if your language uses one form for all.

## Names from the config

The rings, the hour names, the bond levels, the anniversary gifts, the divorce court and grounds, the clerk, the venue and the officiant are named in the language file too. Their keys start with `cfg_`:

```lua
cfg_ring_ring_diamond = "Diamond Solitaire",
cfg_slot_s1 = "Early evening",
cfg_level_1 = "Newlywed",
cfg_office_valentine_venue = "The Mayor's Garden",
```

If you add a ring, an hour, a level or a gift in the config, add its `cfg_` line to each language file. Or give it a `name` or `label` in the config, which is then shown as written in every language.

## Text drawn by the game

Hold prompts (*Book a Ceremony*, *Sit Down*) and map markers are drawn by the game itself, whose font has no accented letters. The script simplifies them there automatically: `ş` becomes `s`, `ö` becomes `o`, `·` becomes `-`. Everything in the interface keeps its accents.

## Item names

Item names and descriptions in the satchel belong to your inventory, not to this script:

* **VORP.** `install/vorp_items_tr.sql` renames the six items to Turkish. For another language, write the same `UPDATE` lines with your own text and restart the server.
* **RSG.** Change `label` and `description` in `rsg-core/shared/items.lua`.

The description the script writes on each invitation and certificate, such as *Wedding invitation from Theodora & Elias, for Arthur Morgan*, comes from the language file.

## Changing any text

To reword anything in English, edit its line in `locales/en.lua`. Keep a copy of the files you changed before updating the script. See [Updating](/script-documentation/cas-wedding/installation.md#updating).
