Move platform-specific parts of wxLocale::Init() to wxUILocale

This is tidier than using #ifdefs in the same common file and also
ensures that initializing wxLocale affects wxUILocale too, which will be
important for compatibility when the code elsewhere is modified to use
wxUILocale::GetInfo() instead of wxLocale::GetInfo() in the upcoming
commits.

This commit is best viewed with --color-moved git option.
This commit is contained in:
Vadim Zeitlin
2021-08-14 17:42:29 +01:00
parent d3a1abaab2
commit 37a23e1ab1
9 changed files with 270 additions and 193 deletions

View File

@@ -29,6 +29,12 @@ public:
// Configure the UI to use the default user locale.
static bool UseDefault();
// Use the locale corresponding to the given language.
//
// This is a compatibility function used by wxWidgets itself, don't use it
// in the new code.
static bool UseLanguage(const wxLanguageInfo& info);
// Get the object corresponding to the currently used locale.
static const wxUILocale& GetCurrent();