I'm trying to set a default language - based on a #define in my application code.
What I see is that the language used is defined in the constructor at line 539
Then in begin() it reads the WiFiSettings-language file (line 498)
and if that language is available sets WiFiSettings.language to the value,
Otherwise it picks an available language at 503.
This works well if for example I #define LANGUAGE_DE at the top of WiFiSettings_strings.h , German is set as the default. But in my case I want several languages compiled and still pick an explicit default.
I'd like to override it coming up first time in English - but honor any user choice that has been saved.
I think I have to do this BEFORE calling begin(), which means before ANYTHING in WIFiSettings is called, as everything else calls being()
If this is the intended way to set a default language, do you mind if this is documented (to avoid an accidental invocation of Hyrum's law) :-)
I'm trying to set a default language - based on a #define in my application code.
What I see is that the language used is defined in the constructor at line 539
Then in begin() it reads the WiFiSettings-language file (line 498)
and if that language is available sets WiFiSettings.language to the value,
Otherwise it picks an available language at 503.
This works well if for example I
#define LANGUAGE_DEat the top ofWiFiSettings_strings.h, German is set as the default. But in my case I want several languages compiled and still pick an explicit default.I'd like to override it coming up first time in English - but honor any user choice that has been saved.
I think I have to do this BEFORE calling
begin(), which means before ANYTHING in WIFiSettings is called, as everything else callsbeing()If this is the intended way to set a default language, do you mind if this is documented (to avoid an accidental invocation of Hyrum's law) :-)