Skip to main content

Locale System

Language and localization system

This section

Locale System

All user-facing strings are stored in locale files under locales/. The default language is English (en).

Setting the Language

lua
Config.Locale = 'en' -- Change to your language code

Adding a New Language

  1. Copy locales/en.lua to locales/xx.lua (replace xx with your language code, e.g., tr for Turkish)
  2. Translate all string values in the new file
  3. Set Config.Locale = 'xx' in shared/config.lua

Usage

Lua (Client/Server)

lua
Lang('key', ...) -- With optional format parameters

React (NUI)

jsx
const { t } = useLanguage();
t('key', 'Fallback text')