F5 StudioF5 Studio
Skip to main content

Localization

F5 Shadow Market ships with 12 languages. Every player-facing string lives in locales/<code>.lua — the market UI, notifications, the placer HUD, the admin panel, AND the Discord webhook embed labels.

Supported Languages

CodeLanguage
enEnglish
plPolish
deGerman
esSpanish
frFrench
ptPortuguese
nlDutch
csCzech
trTurkish
arArabic
thThai
zhChinese

Selecting a Language

config.lua
F5Cfg.Locale = 'pl'

Change the code and restart the resource. The change applies server-wide.

Fallback Chain

The locale lookup (the _L(key, ...) helper in shared.lua) follows this chain:

  1. Locales[<configured locale>][key]
  2. Locales['en'][key] (fallback)
  3. The literal key name as a string (last resort)

So a missing key in locales/de.lua shows the English string for that key — never a broken placeholder. locales/en.lua is the canonical reference: it always contains every key the script uses. Strings support string.format placeholders (%s, %d, %.1f), filled in at runtime.

The NUI receives a merged bundle (English base + active-language overrides) built by BuildLocaleBundle(), so the front-end inherits the same fallback behaviour.

What Is Localized

The English file contains the full set of keys covering, among others:

SectionExamples
Market core / navmarket_title, command_suggestion, nav_marketplace, nav_create, nav_orders
Listings & searchbuy_now, make_offer, starting_price, buyout_price, current_bid, sort_newest
Listing creationlisting_title, listing_duration, create_fee, val_* validation messages
Auctionsplace_bid, min_bid, bid_history, anonymous_bidder, leader_tag, sv_bid_*
Bargainingbargain_make_offer, bargain_counter, bargain_status_*, sv_bargain_*
Discountslower_price, discount_*, filter_discounted
Orders & deliverystatus_*, delivery_item, notify_delivery_ready, target_pickup_package, blip_package_pickup
Placer HUDui_placer_rotate, ui_placer_zoom, ui_placer_place, ui_placer_cancel
Reviews & profilereview_title, rate_1..rate_5, profile_trust, profile_recent_reviews
Admin paneladmin_title, admin_col_*, ban_*, sv_admin_*
Discord webhookswebhook_title_*, webhook_field_*, webhook_origin_*, webhook_footer

Adding a New Language

1. Copy en.lua and rename

cp locales/en.lua locales/ru.lua

2. Change the locale key inside the file

locales/ru.lua (first line)
Locales['ru'] = {
-- ...

The Locales['<code>'] key must match what you put in F5Cfg.Locale. The filename is loaded automatically by the manifest's locales/*.lua glob.

3. Translate the values

Translate every right-hand-side string, keeping all %s / %d / %.1f placeholders intact.

4. Activate it

config.lua
F5Cfg.Locale = 'ru'

Restart the resource.

Customizing Without Forking

You don't need a new file to change a single string — edit the value in place in any locale file. The files are plain Lua tables.

locales/en.lua
-- Original
market_title = 'Shadow Market',
-- Customized
market_title = 'The Black Bazaar',

Embed Localization

Discord webhook embeds use the same locale system, so they follow F5Cfg.Locale. To use a different language for the audit channel than the in-game one, override the webhook_* values directly with whatever language you want, regardless of the active locale.

See Also