Open lilly1987 opened 2 years ago
Greetings!
Thank you for the PR. Before I began reviewing it, I noticed one important design choice that I'd like to ask about.
i18nEx allows swapping Core.TranslationLoader
which handles loading the actual translations. The loader is BasicTranslationLoader
, which reads translations directly from a file by default.
You can change the loader to your own by editing the i18nEx configuration file ([Info].Loader
option, see Core.GetLoader for how it works).
With that option, you can easily create a ZIP loader and tell i18nEx to use it with a configuration option.
I made translation loaders modular for cases where you want to download translations from another file type (e.g. encrypted ZIPs). Your proposed solution edits BasicTranslationLoader directly, but in my opinion, that isn't necessary. Instead, I suggest two options:
BasicTranslationLoader
to a separate class and add potentially an option to switch between the two loaders.What is your opinion on this? Any reason why you specifically want your ZIP logic to be part of BasicTranslationLoader?
I wish there was a separate dll example. There is no reason why the ZIP logic should be part of the BasicTranslationLoader.
zip support