Skip to main content

Language System

SixM scripts support multiple languages through locale files. Set your language in the config:
Config.Language = 'es'  -- Spanish

Available Languages

Most scripts include these languages out of the box:
CodeLanguage
enEnglish
esSpanish
frFrench
deGerman
ptPortuguese

Locale Files

Locale files are stored in the locales/ directory:
sixm_scriptname/
└── locales/
    ├── en.lua
    ├── es.lua
    └── fr.lua
Each file contains a table of translated strings:
-- locales/en.lua
return {
    ['welcome'] = 'Welcome!',
    ['open_menu'] = 'Press ~INPUT_CONTEXT~ to open the menu',
    ['no_permission'] = 'You do not have permission to do this',
    ['success'] = 'Action completed successfully',
}

Adding a Custom Language

1

Copy an existing locale file

Copy locales/en.lua and rename it (e.g., locales/it.lua for Italian).
2

Translate the strings

Translate each string value while keeping the keys the same.
3

Update config

Config.Language = 'it'
4

Restart the resource

Restart to load the new locale.
If a translation key is missing in your locale file, the script will fall back to English.