Localization
Details about creating and using localization files.
Localization is a way to configure uMod and plugins to send messages using different languages. It is possible to localize uMod or any plugin that supports localization.
Built-in localization
uMod is bundled with English localization files..
umod
└───lang
└───en
└───umod.toml
A fresh uMod installation will create the above directory umod/lang/en/ with a single file umod.toml that contains the English messages used in uMod.
Customizing plugin messages
If a plugin named EpicPlugin is installed and supports localization, then expect that when the plugin is loaded a localization file will be created in the umod/lang/en/ folder. uMod.org requires new plugin submissions support English localization for player-facing messages.
umod
└───lang
└───en
└───EpicPlugin.toml
To localize plugin messages create a new directory under the umod/lang folder using the two-letter ISO-639-1 language code for the language.
For example:
en - English
fr - French
de - German
pl - Polish
ru - Russian
es - Spanish
For Spanish, create a directory umod/lang/es/ (if it does not exist already).
Then copy the localization file from the default English location, for example umod/lang/en/EpicPlugin.toml to the new folder.
umod
└───lang
└───en
└───EpicPlugin.toml
└───es
└───EpicPlugin.toml
Then translate the message in umod/lang/es/EpicPlugin.toml from English to Spanish.
Finally, reload EpicPlugin using the umod.reload command: umod.reload EpicPlugin
Now any users with a Spanish locale will see the Spanish messages instead.
uMod will usually attempt to detect the locale of new players automatically (if the game supports it). If the locale was not properly detected, any player can change their locale by using the lang command. For example: lang es.
Developers
Plugin developers [https://umod.org/guides/the-basics/localization](may include) other languages by default, though only English is required.