G4me4u / g4mespeed

GNU General Public License v2.0
8 stars 3 forks source link

[Feature request] Make language files configurable #6

Open shinyashen opened 1 year ago

shinyashen commented 1 year ago

Recently, when I was trying to translate this mod, I found that when the translated en.lang file (my file's name: zh-CN.lang) was loaded through the resource pack, the translated file could not be loaded correctly. Then, I found the following in your code:

https://github.com/G4me4u/g4mespeed/blob/c960f5b4ff926b72a8044491f82d083d846038cf/src/main/java/com/g4mesoft/core/GSCoreExtension.java#L33

After this, I tried loading the resource pack with the translated file renamed en.lang, but the translation still didn't work. Is there a way to make the mod, like most other mods, recognize the language files (such as .json or .lang) in the resource pack and load them correctly?

G4me4u commented 1 year ago

I am currently working on slowly transferring to using the fabric API translations. There are some implications that I have yet to solve, but those will be fixed eventually.

Both Capture & Playback, and G4mespeed-UI have moved away from my own translation module.

The only reason it is currently still in use is because some settings might only exist on the server, in which case translations have to be sent to the client. Either way, I want to fix this issue.