From 31edb19379908f39ec026dc9f946b7740e6b9a0e Mon Sep 17 00:00:00 2001 From: Alexander Batalov Date: Sun, 14 Aug 2022 12:52:13 +0300 Subject: [PATCH] Use English as fallback language --- src/message.cc | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/message.cc b/src/message.cc index 96280c5..4491b29 100644 --- a/src/message.cc +++ b/src/message.cc @@ -200,6 +200,15 @@ bool messageListLoad(MessageList* messageList, const char* path) sprintf(localized_path, "%s\\%s\\%s", "text", language, path); file_ptr = fileOpen(localized_path, "rt"); + + // SFALL: Fallback to english if requested localization does not exist. + if (file_ptr == NULL) { + if (compat_stricmp(language, ENGLISH) != 0) { + sprintf(localized_path, "%s\\%s\\%s", "text", ENGLISH, path); + file_ptr = fileOpen(localized_path, "rt"); + } + } + if (file_ptr == NULL) { return false; }