Translating ServerPackCreator
i18n in ServerPackCreator
If you wish to run ServerPackCreator with your locale (if it is already supported), you can either:
Run
java -jar ServerPackCreator-X.X.X.jar -lang your_locale
for examplejava -jar ServerPackCreator-X.X.X.jar -lang en_GB
. This will create the lang.properties-file with your specified locale.Running
java -jar ServerPackCreator-x.x.x.jar
without-lang en_GB
or any other language will set the locale to en_us by default and create the lang.properties-file.Modify the
serverpackcreator.properties
-file in the same directory as ServerPackCreator-X-X-X.jar and set your locale like thislang=your_locale
for examplelang=en_GB
If you want to contribute translations to ServerPackCreator, check out the serverpackcreator-api/src/commonMain/i18n
-directory containing already available translations to see how they are set up. Then, make your changes, test them, and open a pull request on GitHub according to the CONTRIBUTING.md
.
Adding a translation
Say you want to translate ServerPackCreator to german. You would need to add the file Gui_en_GB.properties
In the english properties, you will see entries like
So, in order to translate them to german, in your Gui_en_GB.properties
-file, you would add
Then, either in your serverpackcreator.properties
set de.griefed.serverpackcreator.language=de_DE
or launch ServerPackCreator with the argument -lang=de_DE
.
Voila! The menubar will now have german translations!
Keep in mind when using languages other than en_GB
: Any key not found in your currently set language will fall back to the english default.