> For the complete documentation index, see [llms.txt](https://docs.0resmon.org/0resmon/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.0resmon.org/0resmon/0resmon-1/s4-resources/s4-crosslab/localization.md).

# Localization

CrossLab ships with English and Turkish. The active language is set in `config.lua`:

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

***

## Adding a new language

1. Create a new file under `locales/`, e.g. `locales/de.lua`
2. Copy the structure from `locales/en.lua` and translate the values
3. Register it in `fxmanifest.lua` under `shared_scripts`:

```lua
shared_scripts {
    '@ox_lib/init.lua',
    'locales/en.lua',
    'locales/tr.lua',
    'locales/de.lua',  -- add your file here
    'config.lua',
}
```

4. Set `Config.Locale = 'de'`

The script falls back to English if a key is missing in the selected locale, so partial translations work fine.

***

## Key reference

| Key                                    | Description                                                |
| -------------------------------------- | ---------------------------------------------------------- |
| `menu_title`                           | Panel header title                                         |
| `menu_tab_style`                       | Style tab label                                            |
| `menu_tab_color`                       | Color tab label                                            |
| `menu_tab_advanced`                    | Advanced tab label                                         |
| `menu_tab_code`                        | Code tab label                                             |
| `script_keymapping_crosshair_settings` | Key mapping description shown in FiveM settings            |
| `script_training_entered`              | Chat message on training entry (has `%s` for exit command) |
| `script_training_exited`               | Chat message on training exit                              |
| `script_textui_aim_training`           | Text UI label near training area                           |
| `script_textui_exit_training`          | Text UI exit hint                                          |
| `game_*_name`                          | Minigame display name                                      |
| `game_*_desc`                          | Short description shown in game list                       |
| `game_*_detail`                        | Long description shown when game is selected               |
| `ui_diff_easy/medium/hard`             | Difficulty button labels                                   |
| `ui_results_*`                         | Results screen text                                        |

All UI-facing strings go through the locale system, so nothing is hardcoded in the NUI.


---

# 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:

```
GET https://docs.0resmon.org/0resmon/0resmon-1/s4-resources/s4-crosslab/localization.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
