Koja Scripts

Translations

How languages work in koja-inventory-v2: one JSON file per language in locales/, choosing the server language and adding a new one.

Translations

Every text the players and admins see comes from one JSON file per language in locales/. English (en.json) and Polish (pl.json) are included and complete: the UI, notifications, errors, key binding names, admin panel and the descriptions in the Settings tab.

Set the server language

shared/config.lua
Config.Locale = 'pl'

The same file is used by the server, the client and the UI. If the file does not exist, en.json is used.

Add a language

  1. Copy the English file

    Copy locales/en.json to locales/<code>.json, for example locales/de.json.
  2. Translate the values

    Change only the values, never the keys. Keep placeholders like %item, %count or %id as they are; they are replaced with real values.
  3. Switch to it

    Set Config.Locale = 'de' and restart the resource.

A key missing from your file falls back to the English text built into the code, so a partly translated file still works.

Sections of the file

SectionWhat it holds
uiInventory interface: panels, buttons, context menu, dialogs.
notifyNotifications.
errorError messages for every server error code.
keysNames of the key bindings in the FiveM settings.
containerDefault names of containers (Ground, Trunk...).
handsHeld item hints.
outfitOutfit names and progress texts.
adminAdmin panel.
locAdmin panel Locations tab.
settingsAdmin Settings tab, including settings.groups.<group> and settings.fields.<field> labels and descriptions.
slotGroupsHeadings of equipment slot groups, including groups of custom slots.

Item labels and descriptions are not in the locale files: they come from the item definitions in shared/items.lua, ox data or runtime items.