Koja Scripts

Translations

Languages shipped with Koja Spawn Selector, how to switch them and how to add or change a translation, including plural forms.

Translations

Every text — the panel, the map hints, lock labels, combat log markers, Discord logs, notifications and the camera caption — comes from shared/locales/.

Shipped languages

FileLanguageAdmin tabs
cs.luaČeštinaEnglish
de.luaDeutschEnglish
en.luaEnglishEnglish
es.luaEspañolEnglish
fr.luaFrançaisEnglish
it.luaItalianoEnglish
nl.luaNederlandsEnglish
pl.luaPolskiPolski
pt-BR.luaPortuguês (Brasil)English
tr.luaTürkçeEnglish

Everything players see is translated in all ten files. The admin Editor and Stats tabs (editor_*, admin_*, stats_*, capture_* keys) are in English and Polish; other languages fall back to English for them until you add the keys.

shared/config.lua
Config.Locale = 'de'

A key missing in your language falls back to English.

Add a language

  1. Copy shared/locales/en.lua to a new file, for example shared/locales/sv.lua.
  2. Change the first line to Locales['sv'] = { and translate the values. Keep the keys.
  3. Set Config.Locale = 'sv' and restart the resource.

Every file in shared/locales/ is loaded automatically.

Placeholders

KeyPlaceholder
locked_job%s = job label, e.g. "Police only"
time_minutes, time_hours, time_days%d = number
event_ends%s = time left, e.g. "46:53"
combat_marker_time%d = seconds
log_combat_body%s name, %s character, %s kind (drop / relog), %s reason
stats_days%d = number of days

Plural forms

Languages with a separate form for 2–4 (Polish: "2 minuty", "5 minut") can add time_minutes_few and time_hours_few. The "few" form is used for numbers ending in 2, 3 or 4, except 12–14:

shared/locales/pl.lua
time_minutes = '%d minut temu',
time_minutes_few = '%d minuty temu',

Location names

Labels and descriptions of your spawns are written in Config.Spawns, in the editor or by the resource that registers them, so translate them there. Category labels come from category_<id> keys; a label in Config.Categories overrides them. Weather names are the weather_<name> keys.