Hello,
Just discover your plugin, seems to work fine (I'll test deeper and report you problems if any) but I saw the localisation could be much better:
- Move the
Language
(and maybe Prefix
... not sure if it has to be) parameter into Config.yml
- Split Language.yml into language_en.yml and language_de.yml (*), or make a lang/{langcode}.yml
This will help localise your plugin in other languages. It's IMHO cleaner than everything in a single file for admins when there are more than a few sentences. And users could share and contribute their independent languages files easier.
To illustrate what I mean, you can check how Citizens2 manage locales files for example:
https://github.com/CitizensDev/Citizens2/tree/master/main/src/main/resources
You can for example in your reloadConfig()
read getConfig().getString("Language")
, then load the appropriate file in a list, or something like that. I've already did this king of implementation, I could try to find where it is in my chaos of not finished codes if needed :-)
But this is a suggestion and not a priority ;) Thanks for sharing this plugin with the community!
(*) I think it's better to use ISO code for language filenames, but it's a detail.
Edit: (replaced "files" by "filenames" in this sentence to be more clear).
Edit: Here is an example of a separate lang file for french language.
(fell free to reuse it if you want, it is yours!)