Languages
Set one language for every Swarm script, override it per script, and edit or add translations.
Set your server's language
One setting changes the language of every Swarm script. Open swarm_bridge/config.lua and set SwarmConfig.Locale:
SwarmConfig.Locale = 'de'
Then restart the server. These languages ship with every Swarm script:
| Code | Language |
|---|---|
en | English |
no | Norwegian |
de | German |
fr | French |
es | Spanish |
pt-br | Portuguese (Brazil) |
nl | Dutch |
pl | Polish |
tr | Turkish |
it | Italian |
Common alternative codes are understood too: nb and nn mean no, pt and br mean pt-br, and en-gb / en-us mean en.
If a line is missing from a translation, that line shows in English, so nothing ever appears blank.
Use a different language for one script
Every script follows Swarm Bridge by default, because its own setting is 'auto'. To force one script into another language, change that script's setting to a language code:
Config.Locale = 'auto' -- follow swarm_bridge (default)
Config.Locale = 'fr' -- always French, whatever the bridge says
| Script | Setting | File |
|---|---|---|
| Most Swarm scripts | Config.Locale | config.lua |
| Swarm DJ | Config.Locale | shared/config.lua |
| Swarm Multichar | SwarmMulticharConfig.Locale | config.lua |
| Swarm Loading Screen | SwarmLoadingscreenConfig.Locale | config.lua |
Change the wording or add a language
Each script keeps its text in a locales folder, with one file per language, for example swarm_fishing/locales/de.lua. Each file holds both the in-game messages and the on-screen menu text, so a translator only ever edits one file per language.
Change some wording
Open the language file you use, find the line and change the text between the quotes. Restart the script to see it.
Add a new language
- In the script's
localesfolder, copyen.luato<code>.lua, for examplesv.lua. - At the top of the new file, change
Locales['en']to your code, for exampleLocales['sv']. - Translate the text between the quotes. Don't change the names on the left.
- Set
SwarmConfig.Locale = 'sv'in Swarm Bridge (or the script's own setting) and restart. - Repeat for each Swarm script you want in that language. Scripts without the file fall back to English.
Locales = Locales or {}
Locales['sv'] = {
dock_menu_title = 'Fiskebrygga',
buy_rod = 'Köp %s ($%s)',
not_enough_money = 'Du har inte råd med det.',
ui_boat_return_title = 'Lämna tillbaka båten',
-- ...
}
Keep these exactly as they are
| Looks like | What it is |
|---|---|
%s, %d, %02d | Placeholders filled in by the script, such as a price or a name. Keep the same number of them, in the same order. |
{0}, {name} | Placeholders used by on-screen menus. Keep them as written. |
~g~, ~r~, ~s~ and similar | GTA colour codes. Keep them where they are. |
Keys that start with ui_ are on-screen text: menus, buttons and labels in the script's interface. Everything else is in-game messages such as notifications.
What isn't in the language files
Names you set yourself in each script's config, such as item labels, zone names, ranks and blip names, aren't translated by the language files. Change them in that script's config.lua. The same goes for item names and descriptions in your inventory's item list.
Need help?
Ask in the Swarm Scripts Discord.
Swarm Scripts
Nyxia Development