Difference between revisions of "Tutorial:Localization"
From MineTweaker 3
Line 2: | Line 2: | ||
Two variants of the function exist - one that sets the translation no matter the current language, and one that overrides a translation but only when the given language matches the current language: | Two variants of the function exist - one that sets the translation no matter the current language, and one that overrides a translation but only when the given language matches the current language: | ||
− | + | import minetweaker.game.IGame; | |
// Set translation but only if language is en_US | // Set translation but only if language is en_US | ||
game.setLocalization("en_US", "nei.inventory.prev", "Past"); | game.setLocalization("en_US", "nei.inventory.prev", "Past"); |
Revision as of 19:14, 6 June 2015
Since MineTweaker 3.0.8, it is possible to change localization strings.
Two variants of the function exist - one that sets the translation no matter the current language, and one that overrides a translation but only when the given language matches the current language:
import minetweaker.game.IGame; // Set translation but only if language is en_US game.setLocalization("en_US", "nei.inventory.prev", "Past"); //KEY, TEXT - You will want to use this one most of the time, it overrides no matter the language game.setLocalization("nei.inventory.next", "Future");
To find localizations, check the localization files in the assets of Minecraft or the mods you want to alter.