Cube Scripts

Localization

Change the language or translate Cube Gang into your own.

config.luaLua
Config.Locale = 'en' -- 'en' / 'fr'

The locale applies to notifications, help texts, logs and the whole interface. English and French are included.

Editing a text#

Game texts live in locale/, one file per language, and are not escrowed.

locale/en.luaLua
Locales['en'] = {
    treasury = {
        deposit_success = 'You deposited $%s',
        withdraw_success = 'You withdrew $%s',
    },
}

Keep every %s - it is replaced by a value, such as an amount or a player name.

Adding a language#

1

Copy an existing file#

Copy locale/en.lua to locale/es.lua and rename the table key:

locale/es.luaLua
Locales['es'] = {
    -- ...
}
2

Translate the values#

Translate the values, never the keys. Any key you leave out falls back to English, and a missing key prints a warning in the console so you can spot it.

3

Select it#

config.luaLua
Config.Locale = 'es'

The manifest loads locale/*.lua, so the new file is picked up without any other change.

Note

The interface is compiled. If you want it translated into your language too, send us your locale file on Discord and we will ship it in the next update.