Skip to the content
Docs

Localization

Every text a player sees — notifications, the F3 menu, HUD words, paper headings, the admin panel — comes from an open locale file.

The script ships in English only. Adding a language is a copy and a translate; no escrow access is needed.

Selecting a language

lua
-- config.lua
Config.Locale = 'en'

Adding a language

  1. Copy locales/en.lua to a new file, for example locales/fr.lua.
  2. Change the table key to your language code and translate the values:
lua
Locales['fr'] = {
    prompt_recognize        = 'Reconnaître',
    prompt_stop             = 'Arrêter',
    ui_hud_status_noted     = 'Noté',
    ui_hud_status_recognized = 'Reconnu',
    scan_too_far            = 'Rapprochez-vous.',
    -- ...
}
  1. Set Config.Locale = 'fr' and restart the resource.

The manifest loads locales/*.lua, so a new file is picked up without editing anything else.

The Settings page texts

The titles and (i) tips of the admin panel's Settings page live in a second file, locales/en_settings.lua. Only the server reads it. To translate them:

  1. Copy locales/en_settings.lua to locales/fr_settings.lua.
  2. Change every Locales['en'] near the top of the file to Locales['fr'], and translate the values.

A setting you leave out falls back to English. These texts are plain text — no %s placeholders.

Placeholders

Keep every %s and %d exactly where it is — the script fills them in with names, counts, seconds and percentages.

lua
scan_cooldown = 'Give it a moment before you look again (%d s).',
ui_hud_hint   = 'Looks like someone you were told about: %s (%d%%)',

A %% is a literal per-cent sign. If a translation breaks a placeholder, the script shows the text without the values filled in rather than erroring — so check your placeholders.

Missing keys

Any key you leave out falls back to English, and then to the key name itself. A partial translation works — it is simply partly English.

That also means an update that adds new keys will not break your language file. New texts appear in English until you translate them.

What is covered

locales/en.lua has over 1,100 keys, grouped by feature:

GroupCovers
Key mappingsThe names shown in Settings → Key Bindings → FiveM
Scan, prompt and menuThe F3 menu (including Camera recordings and Stop looking), the Recognize [E] prompt (prompt mode) and every refusal message
HUDThe status words, the pause counter, the slow line, REC, the hint line
Memory lines"Met him on … in the evening", place names, "I know him well"
DevicesVoice changer, hidden camera, magnetic scanner, batteries, printing
PapersReport, statement and description headings and field labels
SocialIntroduce, describe, statement, the picker
Implant and clinicThe consent dialog, name rules, refusals
Admin panelEvery page, button, label and confirmation in the staff panel
Discord and commandsDiscord export titles and fields, command help texts

The Settings page titles and tips are in locales/en_settings.lua (see above).

Keys beginning ui_ are interface strings. They are sent to the interface from Lua, so they are translated the same way as everything else — you never edit anything inside html/.

House style

  • Single quotes, except where the text contains an apostrophe, which uses double quotes rather than escaping.
  • Player-facing text is written the way a person would speak. "Get closer." not "ERROR: DISTANCE_EXCEEDED".
  • No real character names appear in any string.

Sharing a translation

Translations are welcome — send the file through the support channel at discord.gg/TdMewPJ4W6 (opens in a new tab) and it can ship with a future version.