From 1377cdb3f2ee643ff40a2e883588c4eeddaaeb92 Mon Sep 17 00:00:00 2001
From: Sam Lantinga <[EMAIL REDACTED]>
Date: Tue, 3 Dec 2024 15:04:13 -0800
Subject: [PATCH] Fix the Indonesian language code on Android
---
src/core/android/SDL_android.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/src/core/android/SDL_android.c b/src/core/android/SDL_android.c
index 904237a2b47aa..e24a7547e35b8 100644
--- a/src/core/android/SDL_android.c
+++ b/src/core/android/SDL_android.c
@@ -2601,6 +2601,11 @@ bool Android_JNI_GetLocale(char *buf, size_t buflen)
AConfiguration_getLanguage(cfg, language);
AConfiguration_getCountry(cfg, country);
+ // Indonesian is "id" according to ISO 639.2, but on Android is "in" because of Java backwards compatibility
+ if (language[0] == 'i' && language[1] == 'n') {
+ language[1] = 'd';
+ }
+
// copy language (not null terminated)
if (language[0]) {
buf[id++] = language[0];