v3.1.1: fixed indonesian not working on desktop

This commit is contained in:
Evan Debenham
2025-06-13 12:12:57 -04:00
parent b3d70dc09f
commit 0b93fe2f69

View File

@@ -96,10 +96,15 @@ public class Messages {
}
formatters.clear();
//strictly match the language code when fetching bundles however
bundles = new ArrayList<>();
for (String file : prop_files) {
bundles.add(I18NBundle.createBundle(Gdx.files.internal(file), bundleLocal));
if (bundleLocal.getLanguage().equals("id")){
//This is a really silly hack to fix some platforms using "id" for indonesian and some using "in" (Android 14- mostly).
//So if we detect "id" then we treat "###_in" as the base bundle so that it gets loaded instead of English.
bundles.add(I18NBundle.createBundle(Gdx.files.internal(file + "_in"), bundleLocal));
} else {
bundles.add(I18NBundle.createBundle(Gdx.files.internal(file), bundleLocal));
}
}
}