Skip to content

Default language #45

Description

@mitra42

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions