translations fully working (text only)

next step is adding the assets part
This commit is contained in:
⍚~Nex
2024-04-02 04:37:08 +02:00
parent 221d1c8cda
commit 2ba7aaf0e9
3 changed files with 22 additions and 19 deletions
@@ -5,11 +5,17 @@ class MiscOptions extends OptionsScreen {
public override function new() {
super("Miscellaneous", "Use this menu to reset save data or engine settings.");
var lanArray:Array<String> = TranslationsUtil.translList();
lanArray.push(TranslationsUtil.DEFAULT_LANGUAGE);
if(!lanArray.contains(TranslationsUtil.DEFAULT_LANGUAGE)) lanArray.push(TranslationsUtil.DEFAULT_LANGUAGE);
add(new ArrayOption(
"Language",
'The language the Engine currently uses (the default one is ${TranslationsUtil.DEFAULT_LANGUAGE}).',
lanArray, lanArray, "language", function(lan:String) TranslationsUtil.setTransl(lan)));
'The language that the engine currently uses (the default one is ${TranslationsUtil.DEFAULT_LANGUAGE}).',
lanArray, [for(lan in lanArray) lan.split("/").last()], "language",
function(path:String) {
TranslationsUtil.setTransl(path);
parent.remove(this);
this.clear();
parent.add(new MiscOptions());
}));
#if UPDATE_CHECKING
add(new Checkbox(
"Enable Nightly Updates",