Skip to main content

Locale System

Locale system for all user-facing strings

This section

Locale System

All user-facing strings are defined in Config.Locales inside config.lua. The locale table is sent to the React UI on panel open.

How It Works

  1. Server sends Config.Locales to the client via event
  2. Client forwards locales to the NUI via UPDATE_LANGUAGE action
  3. React components access strings via the useLanguage() hook
  4. Default fallback locales are hardcoded in the UI in case server data hasn't arrived

String Categories

The locale table is organized by page/section:

  • dashboard: Creator panel titles, tab labels, earnings labels, pending requests labels
  • createEvent: Step titles, field labels, button labels, validation messages
  • admin: Admin panel titles, tabs, buttons, category/creator management labels
  • explore: Explore page title, buttons, filter labels
  • detail: Event detail labels, action buttons, location hidden/reveal text
  • myEvents: My events page title, tabs, action buttons
  • pendingRequests: Loading text, approve/reject labels, toast messages
  • earnings: Stats labels, chart title, withdraw labels, transaction labels
  • common: Shared labels (free, paid, participants, approval, instant, public, private)

Customization

To change any UI text, edit the corresponding key in Config.Locales:

lua
Config.Locales = {
dashboard = {
title = "Creator Panel",
earnings = "Earnings",
-- ...
},
createEvent = {
title = "Create New Event",
step1Title = "Basic Info",
-- ...
},
-- ...
}