Always succeed in CreateForLanguage(wxLANGUAGE_ENGLISH)

This is required for wxLocale compatibility, as using wxLANGUAGE_ENGLISH
is supposed to be the same as using "C" locale (even if it isn't,
really) at wxLocale level.
This commit is contained in:
Vadim Zeitlin
2021-08-31 03:25:50 +02:00
parent c835d1afa6
commit 5bf11d94a7
2 changed files with 18 additions and 2 deletions

View File

@@ -50,7 +50,9 @@ public:
// The language passed to this function is a valid language, i.e. neither
// wxLANGUAGE_UNKNOWN nor wxLANGUAGE_DEFAULT.
//
// It may return NULL in case of failure.
// It may return NULL in case of failure, but never does so for English
// languages because wxLocale(wxLANGUAGE_ENGLISH) is always supposed to
// work, so it just falls back on CreateStdC() if it fails to create it.
static wxUILocaleImpl* CreateForLanguage(const wxLanguageInfo& info);
// Use this locale in the UI.