Currently, we support enabling the globalization invariant mode through app config switch. we need to have a way to enable this globally to use it in the Alpine docker image. The way we are going to support that is by allowing enabling the mode through a global environment variable.
The way this will work is:
- if the application declared the app config switch
System.Globalization.Invariant, we'll honor that setting and will not read the environment variable
- if the app didn't declare the config switch we'll try to read the environment variable
DOTNET_SYSTEM_GLOBALIZATION_INVARIANT and honor it if it is declared
- Otherwise, if the config switch nor the environment variable is declared, we'll assume the Invariant mode is off and the app required to run with full globalization and ICU would be required on Linux based platforms.