For the complete documentation index, see llms.txt. This page is also available as Markdown.

📚Languages

Var Coins Shop ships with FR / EN / ES translations. Adding a language is a 2-step process.

Configure available languages

In shared/config.lua:

Language = {
  Default = "en",
  Fallback = "en",
  AllowClientSelection = false, -- true = the player can change language from the UI
  Available = {
    fr = { label = "Francais" },
    en = { label = "English" },
    es = { label = "Espanol" },
  }
}
Key
Effect

Default

Locale used for new accounts

Fallback

Locale used when a translation key is missing

AllowClientSelection

If false, the player cannot change language from the UI

Available

Map of locale code → label shown in UI

Add a new language

Example: add German.

Step 1. Add the entry in Available:

Step 2. In shared/locales.lua, copy the existing en = { ... } block and translate it:

The script will automatically pick up the new locale on resource restart.

Per-player locale persistence

Each player's locale is stored in coins_shop_accounts.locale. It is updated when:

  • The player switches language from the UI (only if AllowClientSelection = true)

  • You call the server event var-shop:setLocale from a custom flow

The localeUpdate webhook is fired on every change.

Last updated