Localization & items
Locales, distance units, and racing tablet inventory items.
Locales
All user-facing UI / notification strings live in locales/*.json (flat snake_case keys).
Bundled languages
| File | Language |
|---|---|
en.json | English |
es.json | Spanish |
pt.json | Portuguese (Brazil) |
de.json | German |
fr.json | French |
pl.json | Polish |
Set the active locale:
Config.Locale = 'es' -- en | es | pt | de | fr | plOr rely on the ox:locale convar if you use that instead.
To add another language: copy locales/en.json → locales/<code>.json, translate values (keep keys and placeholders like %s / [{place}]), then set Config.Locale.
Lua uses ox_lib locale helpers; the tablet UI receives the same dictionary from the resource context.
Control prompts in creator/join text use tokens like {join}, {host}, {place} that resolve to the player's actual keybind labels.
Distance units
Config.DistanceUnit = 'mi' -- or 'km'Lengths are stored in meters; this only changes labels in the tablet (track length chips, etc.).
Inventory item
Default: racing_tablet — must match Config.TabletItemName.
| Framework / inventory | Install from |
|---|---|
| QBCore (qb-inventory, qs-inventory, …) | items/qbcore.lua |
| ox_inventory | items/ox_inventory.lua |
| ESX (items SQL table) | items/esx.sql |
items/ is escrow-ignored so you can edit freely. The resource registers the useable hook itself in server/edit.lua for qbcore / qbox / esx.
After adding:
- Restart inventory / core
- Ensure
Config.EnableStandaloneTablet = true - Give the item to a tester
Optional: point the item image at a tablet PNG in your inventory images folder.
