Difference between revisions of "Tutorial:Localization"
From MineTweaker 3
(Created page with "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...") |
m (4 revisions imported) |
||
(3 intermediate revisions by 3 users not shown) | |||
Line 4: | Line 4: | ||
// Set translation but only if language is en_US | // Set translation but only if language is en_US | ||
− | game. | + | 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 | //KEY, TEXT - You will want to use this one most of the time, it overrides no matter the language | ||
− | game. | + | 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. | To find localizations, check the localization files in the assets of Minecraft or the mods you want to alter. |
Latest revision as of 14:36, 12 September 2023
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:
// 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.