PackModeMenu

PackModeMenu

1M Downloads

Adding localization doesn't work

TCreopargh opened this issue ยท 6 comments

commented

So I made a resource pack and made it loaded, with this text: https://paste.ubuntu.com/p/CRTDMSWccg/ in the file assets/packmodemenu/lang/zh_cn.lang, but it still shows English in game.
I've looked into your code and found that you used a very complicated way to handle localization, actually you can just use I18n.format(String, Object...) (client only) or TextComponentHelper.createComponentTranslation(ICommandSender, String, Object...) (both client and server) to translate the keys, thanks!

commented

I tried to use I18n.format, but that didn't work at all, so I had to implement it like I did.

Feel free to open a pullrequest for that language file and I'll add it to the sourcecode.

You can also change my code so it will work with I18n.format. I didn't get it to work. Help is welcome.

commented

I think you have probably mistaken the pack format, I made the same mistake before, if your pack format is 2(which is the default) you will have to change the language file from en_us to en_US. Or you can include a pack.mcmeta and specify the pack format as 3.

commented

I had specified pack format 3 and lowercase locales but even then it doesn't want to work.

commented

Hmm I'll probably take a look if I have time for this.

commented

That would be nice. Thank you.

commented

Fixed with 0403bf0
Thank you for the pull request!