~/docs/coins-shop/configuration/languages
coins shop docs›
Coins Shop
Languages
-- 3 code blocks · 1 min read
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:
Available = {
fr = { label = "Francais" },
en = { label = "English" },
es = { label = "Espanol" },
de = { label = "Deutsch" }, -- new
}
Step 2. In shared/locales.lua, copy the existing en = { ... } block and translate it:
de = {
shop = {
title = "Cash-Shop",
-- ...
},
errors = {
insufficientFunds = "Nicht genug Coins.",
-- ...
},
}
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:setLocalefrom a custom flow
The localeUpdate webhook is fired on every change.