Skip to content

Commit

Permalink
Merge pull request ExOK#73 from jasminegamedev/main
Browse files Browse the repository at this point in the history
Fixing Localization Issues where Language was not being loaded correctly from the save file.
  • Loading branch information
NoelFB authored Feb 8, 2024
2 parents 434d7ff + 2e11b11 commit 2465969
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Source/Data/Save.cs
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ public int IncFlag(string name)
/// <summary>
/// Current Language ID
/// </summary>
public string Language = "english";
public string Language { get; set; } = "english";

/// <summary>
/// Records for each level
Expand Down
4 changes: 4 additions & 0 deletions Source/Scenes/Startup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ private void BeginGame()
Save.Instance.SyncSettings();
}

// make sure the active language is ready for use,
// since the save file may have loaded a different language than default.
Language.Current.Use();

// try to load controls, or overwrite with defaults if they don't exist
{
var controlsFile = Path.Join(App.UserPath, ControlsConfig.FileName);
Expand Down

0 comments on commit 2465969

Please sign in to comment.