
Adding localization doesn't work
TCreopargh opened this issue ยท 6 comments
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!
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.
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.
I had specified pack format 3 and lowercase locales but even then it doesn't want to work.
Fixed with 0403bf0
Thank you for the pull request!