Skip to main content

Localization

It is highly recommended that you use this feature as it also allows server admins to customize your strings.

Localization is a feature of MessageUtils.

Setup

To start working with it just call MessageUtils.setupTranslations(langResourcePath). For the most basic setup use null as parameter and you're done. Now server admins can add translations for your strings as they wish.

If you want to add your own translations to your mod fill langResourcePath with a string path pointing to a folder in your mod resources.

langResourcePath.PNG
For example BaseIO has MessageUtils.setupTranslations("com/unitedworldminers/BaseIO/lang").
It is recommended to call this method in your init method (FMLInitializationEvent).