Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Default language #45

Open
mitra42 opened this issue Nov 25, 2024 · 0 comments
Open

Default language #45

mitra42 opened this issue Nov 25, 2024 · 0 comments

Comments

@mitra42
Copy link
Contributor

mitra42 commented Nov 25, 2024

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) :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant