Language changed event
TehPers opened this issue ยท 3 comments
With SDV 1.2, we have a new language setting that can be changed in game. Mods, however, can't really detect when the language is changed and update the strings without constantly checking the current language. Can you add a language changed event to SMAPI? It'd allow mods to easily know when the language is changed and switch all the strings that it uses to the correct ones for the current language.
Implementing this feature in a mod would be easy, you'd just need a single config class called Strings
or something that contains all the strings you use, then multiple versions of that config, one per supported language. The default values would be in the default language (English?) and you can have versions of the file for each of the other languages that you support.
I think it makes sense for SMAPI to expose its own event like ContentEvents.AfterLanguageChanged
, since the Stardew Valley developers might change that without warning. It'll just be very easy to implement. ;)