From 0b93fe2f6991bee5edc5b4683282ddb6481a9190 Mon Sep 17 00:00:00 2001 From: Evan Debenham Date: Fri, 13 Jun 2025 12:12:57 -0400 Subject: [PATCH] v3.1.1: fixed indonesian not working on desktop --- .../shatteredpixeldungeon/messages/Messages.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/messages/Messages.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/messages/Messages.java index d45e543b8..2a8502553 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/messages/Messages.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/messages/Messages.java @@ -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)); + } } }