Pathoschild / SMAPI

The modding API for Stardew Valley.
https://smapi.io/
GNU Lesser General Public License v3.0
1.71k stars 258 forks source link

Load game's language earlier for translation #938

Open Tenebrosful opened 3 months ago

Tenebrosful commented 3 months ago

Describe the bug It looks like that Helper.Translation.LocaleEnum is equal to en until a long time, making for exemple not possible to use localization for SMAPI commands description for exemple or other direct use of localized strings in Entry. I don't know if it's possible but it could be nice that game language is load before Entry

To Reproduce Exact steps which reproduce the bug, if possible. For example:

  1. Use any direct use localized String in Entry

Exemple:

Helper.ConsoleCommands.Add("DiscordReload",
  Helper.Translation.Get("command.discordreload.desc"), //<-- LocaleEnum = en (beside having game in french)
  (string command, string[] args) => {
    LoadConfig();
  }
);

Log file https://smapi.io/log/bdc70289233748a0b7468445d04e3159?Mods=SMAPI~RichPresence