Skip to content

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',
}
  1. 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#

KeyDescription
menu_titlePanel header title
menu_tab_styleStyle tab label
menu_tab_colorColor tab label
menu_tab_advancedAdvanced tab label
menu_tab_codeCode tab label
script_keymapping_crosshair_settingsKey mapping description shown in FiveM settings
script_training_enteredChat message on training entry (has %s for exit command)
script_training_exitedChat message on training exit
script_textui_aim_trainingText UI label near training area
script_textui_exit_trainingText UI exit hint
game_*_nameMinigame display name
game_*_descShort description shown in game list
game_*_detailLong description shown when game is selected
ui_diff_easy/medium/hardDifficulty button labels
ui_results_*Results screen text

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