Skip to content

Commit

Permalink
have locale fallback to en_US when not set
Browse files Browse the repository at this point in the history
  • Loading branch information
Rune580 committed Apr 14, 2024
1 parent a5b43e8 commit 9c819ed
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions LethalCompanyInputUtils/Localization/LocaleManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,12 @@ internal static void LoadLocaleData()
var locale = Locale.LoadFrom(localePath);

localeOverlay.Push(locale);

localeKey = locale.fallback;

if (localeKey != "en_US" && locale.fallback is null)
localeKey = "en_US";
else
localeKey = locale.fallback;

localePath = Path.Combine(FsUtils.LocaleDir, $"{localeKey}.json");
} while (localeKey is not null);

Expand Down

0 comments on commit 9c819ed

Please sign in to comment.