> For the complete documentation index, see [llms.txt](https://crystal-studios.gitbook.io/crystal-studios-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://crystal-studios.gitbook.io/crystal-studios-docs/vehicle-keys/configuration/locales.md).

# Locales

Our script supports full localization. By default, it comes with English (en) translation, but you can easily translate all in-game notifications, progress bars, UI labels, and key.

***

### 🛠️ Step 1: Set Your Language in Config

Open your `config.lua` and locate the `Config.Language` setting. Change it to match your language code (e.g., `"pl"`, `"de"`, `"fr"`):

Lua

```
-- Selected language for the script (matches your locales)
Config.Language = "de" 
```

### 📝 Step 2: Create Your Translation File

Translations are located inside `locales` folder. To add your own language, simply copy the language file and change the language code key.

Here is an example of how to add a German (de) translation:

```lua
Locales = Locales or {}

-- Example of a German translation
Locales["de"] = {
    notify = {
        no_keys = "Du hast keine Schlüssel für dieses Fahrzeug.",
        no_keys_found = "Du hast keine Schlüssel gefunden.",
        startStop_no_keys = "Du hast keine Schlüssel, um den Motor zu starten/stoppen.",
        correct_keys_found = "Du hast die richtigen Schlüssel gefunden.",
        search_cancelled = "Suche nach Schlüsseln abgebrochen.",

        vehicle_locked = "Du hast das Fahrzeug abgeschlossen!",
        vehicle_unlocked = "Du hast das Fahrzeug aufgeschlossen!",

        carjack_success = "Du hast den Fahrer überwältigt und die Schlüssel erhalten.",
        carjack_fail = "Carjacking fehlgeschlagen!",

        hotwire_success = "Du hast das Fahrzeug kurzgeschlossen.",
        hotwire_fail = "Kurzschließen fehlgeschlagen.",

        lockpick_start = "Du hast angefangen, das Fahrzeug zu knacken.",
        lockpick_success = "Du hast das Fahrzeug geknackt.",
        lockpick_fail = "Fahrzeug knacken fehlgeschlagen.",
        cant_lockpick_driving = "Du kannst kein Auto knacken, das gerade gefahren wird.",

        searching_keys = "Suche nach Schlüsseln...",

        keys_confiscated = "Du hast die Schlüssel beschlagnahmt.",
        keys_confiscated_cancelled = "Beschlagnahmung der Schlüssel abgebrochen.",
    },
    progress = {
        searching_keys = "Suche nach Schlüsseln...",
        carjacking = "Carjacking-Versuch...",
        police_confiscation = "Polizeiliche Beschlagnahmung läuft...",
    },
    info = {
        search_keys = "[" .. Config.Keybinds.CloseOpenSearchKey .. "]" .. " - Nach Schlüsseln suchen",
        hotwire = "[" .. Config.Keybinds.HotwireKey .. "]" .. " - Fahrzeug kurzschließen",
        palert = 'Fahrzeugdiebstahl im Gange. Typ: ',
        is_key_temp_true = "Ja",
        is_key_temp_false = "Nein",
    },
    key_mapping = {
        hotwire = "Fahrzeug kurzschließen",
        start_stop_engine = "Motor Starten/Stoppen",
        close_open_search = "Schließen/Öffnen oder Suche nach Schlüsseln"
    },
    ui_keyfob = {
        action_text = "KLICK",
        mode_label = "MODUS",
        plate_text = "Kennzeichen",

        mode_doors = "Türen",
        mode_trunk = "Kofferraum",
        mode_engine = "Motor",
        mode_lights = "Licht",
    },
    police_alert = {
        carjacking = "Carjacking",
        steal = "Fahrzeugdiebstahl",
        lockpick = "Fahrzeugdiebstahl (Dietrich)"
    }
}
```

### ⚠️ Important Configuration Notes

* Do not delete the `Config.Keybinds` variables: Inside `info.search_keys` and `info.hotwire`, keep the `[" .. Config.Keybinds.X .. "]` syntax intact. This ensures the script automatically displays the correct, dynamically assigned keybinds.
* Restart the script: After adding your translation and changing the config, save both files and restart your server (or use `/ensure cr-carkeys` in-game) for the changes to apply.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://crystal-studios.gitbook.io/crystal-studios-docs/vehicle-keys/configuration/locales.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
