Open TechnicianLP opened 9 years ago
after pocking through the code i found a method for it game.localize("key")
you should document your functions in the wiki better ....
after poking around some more in the code for localizations (after being stuck because localize("key")
returned null every time)
i noticed you are using reflection to put localizations into the statcollector
when localizing a string you pull it from the languageregistry
but those two are not connected so custom set localizations can't be localized
@TechnicianLP Everyone registered to the minetweaker wiki can edit stuff. So you can help us to complete it.
another thing i noticed is you should localize closer to the top of the page and edit recipes or anything else related to that item after. doing it in reverse seems to not work.
that is if you say recipe.remove .. item recipe.add .. item localize item
it won't work or hasn't worked for me properly
you need to
localize item recipe remove item recipe add item
changes name and changes a recipe.
also you can't localize more than once
localize item localize item won't really work.. or i am doing it wrong
A way to use custom localizations would be nice
os forexample you set:
game.setLocalization("zs.tooltip.bread", "Tasty!");
but then be able to use it eg. in a tooltip<minecraft:bread>.addTooltip(game.getLocalization("zs.tooltip.bread"));
so you could us localized texts (in multiple languages individualy assigned) whereever needed