Skip to content

Commit

Permalink
Fix the Indonesian language code on Android
Browse files Browse the repository at this point in the history
  • Loading branch information
slouken committed Dec 3, 2024
1 parent 46f43c2 commit 1377cdb
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/core/android/SDL_android.c
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand Down

0 comments on commit 1377cdb

Please sign in to comment.