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, notifications and the camera caption — comes from shared/locales/.

Shipped languages

FileLanguage
cs.luaČeština
de.luaDeutsch
en.luaEnglish
es.luaEspañol
fr.luaFrançais
it.luaItaliano
nl.luaNederlands
pl.luaPolski
pt-BR.luaPortuguês (Brasil)
tr.luaTürkçe
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

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 (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.