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:
| Code | Language |
|---|
en | English |
es | Spanish |
fr | French |
de | German |
pt | Portuguese |
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
Copy an existing locale file
Copy locales/en.lua and rename it (e.g., locales/it.lua for Italian).
Translate the strings
Translate each string value while keeping the keys the same.
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.