Possible language fix

This commit is contained in:
Chris 2019-08-05 00:34:13 -04:00
parent 16f7490871
commit 241a118bec
2 changed files with 4 additions and 1 deletions

View File

@ -229,6 +229,9 @@ namespace StardewModdingAPI.Framework
// add more leniant assembly resolvers
AppDomain.CurrentDomain.AssemblyResolve += (sender, e) => AssemblyLoader.ResolveAssembly(e.Name);
// locale event
LocalizedContentManager.OnLanguageChange += locale => this.OnLocaleChanged();
// override game
SGame.ConstructorHack = new SGameConstructorHack(this.Monitor, this.Reflection, this.Toolkit.JsonHelper, this.InitialiseBeforeFirstAssetLoaded);
this.GameInstance = new SGame(this.Monitor, this.MonitorForGame, this.Reflection, this.EventManager, this.Toolkit.JsonHelper, this.ModRegistry, SCore.DeprecationManager, this.OnLocaleChanged, this.InitialiseAfterGameStart, this.Dispose);

View File

@ -529,7 +529,7 @@ namespace StardewModdingAPI.Framework
/*********
** Locale changed events
*********/
if (this.Watchers.LocaleWatcher.IsChanged)
if (this.Watchers.LocaleWatcher.IsChanged || SGame.TicksElapsed == 0)
{
var was = this.Watchers.LocaleWatcher.PreviousValue;
var now = this.Watchers.LocaleWatcher.CurrentValue;