Language System

How does the language system work?

SW Multicharacter's language system is built on a collection of translation files that contain all user interface text. The script detects the player's FiveM language settings and automatically selects the appropriate language if possible. Players can also manually change their preferred language.

Supported Languages

SW Multicharacter supports the following languages by default:

  • English (en) - Default language
  • Turkish (tr)
  • German (de)
  • French (fr)
  • Spanish (es)
  • Italian (it)
  • Portuguese (pt)
  • Russian (ru)
  • Polish (pl)
  • Japanese (ja)

Default Language Configuration

You can set the default language that will be used when a player first connects:

Note:

Config.DefaultLanguage = 'en' -- Options: tr, en, de, fr, ru, es, fi, ja, no, pt, sv, it

This setting determines which language file is loaded by default. Players can change their language in the UI if they prefer a different option.

Customizing Language Files

You can modify the text content of any language or add new languages:

Note:

To modify language files, access the locales directory:

sw_multicharacter > locales

Each language has its own file (e.g., en.lua, de.lua) containing all the text strings used in the script.

Language File Structure

The language files follow a consistent structure:

Locales['en'] = {
  ['character_select'] = 'Character Selection',
  ['create_character'] = 'Create New Character',
  ['delete_character'] = 'Delete Character',
  -- Many more text strings...
}