Two languages ship in locales/: English (en.lua) and German (de.lua). They
use qb-core's Locale helper, which the manifest pulls in via
@qb-core/shared/locale.lua. Both files are shared scripts, so Lang:t works on
the client and on the server.
There is no config key for this. The language is picked from qb-core's standard convar:
setr qb_locale "de"de.lua only builds its Lang object when that convar is exactly "de". Any
other value, including the default "en", leaves English in place.
All four keys live under info. Both files define all four, so there are no
keys present in one language and missing in the other.
| Key | Placeholders | English | German | Used at |
|---|---|---|---|---|
info.cancel |
— | Canceled... |
Abgebrochen... |
Not referenced anywhere in the resource |
info.got_items |
%{amount}, %{label} |
You recieved %{amount}x %{label} |
Du hast %{amount}x %{label} erhalten |
server/server.lua — success notification, both the batched and the no-materials branch |
info.missing_items |
— | You are missing something! |
Dir fehlt etwas! |
client/client.lua and server/server.lua — material check failed |
info.missing_role |
— | You cant do that! |
Das kannst du nicht tun! |
client/client.lua — job/gang check failed |
info.inventory_full |
— | missing | missing | server/server.lua — the swap would exceed the weight limit |
info.inventory_fullis used but not defined.server/server.luacallsLang:t("info.inventory_full")when the result would not fit, but neither locale file has the key. WithwarnOnMissing = truethe player sees the raw key text instead of a message.info.missing_itemsignores the variable it is given. Both call sites pass{item = QBCore.Shared.Items[reqItem].label}, so the label of the first missing material is available, but neither translation contains%{item}. Adding it to the strings —You are missing %{item}— would name the item without any code change.info.cancelis dead. The progressbar's cancel callback stops the animation and unloads the dictionary without notifying the player.- German has no fallback.
de.luapassesfallbackLang = Lang, butlocales/*.luais expanded alphabetically, sode.luaruns first andLangis stillnilat that point.en.luathen doesLang = Lang or ..., which leaves the German object in place. Since German defines every key this has no visible effect today, but a key added toen.luaalone would not fall through to a German session. - Typo in English.
en.luahasYou recievedrather thanYou received. - Spot labels are not localised.
label,blip.labelandprocessingDescare written directly into the spot files, and the shipped examples are German. Change them inshared/*.lua, not here.
Copy de.lua, translate the strings, and change the convar check at the bottom
to your language code. Bear the ordering note above in mind: a file that sorts
after en.lua will find Lang already set to English and can use it as a real
fallback, while one that sorts before it cannot.