CrossLab ships with English and Turkish. The active language is set in config.lua:
Config.Locale = 'en' -- or 'tr'
Adding a new language#
- Create a new file under
locales/, e.g.locales/de.lua - Copy the structure from
locales/en.luaand translate the values - Register it in
fxmanifest.luaundershared_scripts:
shared_scripts {
'@ox_lib/init.lua',
'locales/en.lua',
'locales/tr.lua',
'locales/de.lua', -- add your file here
'config.lua',
}
- 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.