Use English as fallback language

This commit is contained in:
Alexander Batalov 2022-08-14 12:52:13 +03:00
parent d482f0e610
commit 31edb19379
1 changed files with 9 additions and 0 deletions

View File

@ -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;
}