Add wxLanguageInfo::GetCanonicalWithRegion() helper

This simple function allows to simplify the code by avoid to test for
CanonicalRef before using either it or CanonicalName in multiple places.

No real changes.

See #22252.
This commit is contained in:
utelle
2022-04-01 11:26:22 +02:00
committed by Vadim Zeitlin
parent fdfb9cda1b
commit 280cb68887
4 changed files with 23 additions and 5 deletions

View File

@@ -151,6 +151,9 @@ struct WXDLLIMPEXP_BASE wxLanguageInfo
// supported
wxString GetLocaleName() const;
// returns CanonicalRef if set, otherwise CanonicalName
wxString GetCanonicalWithRegion() const;
// Call setlocale() and return non-null value if it works for this language.
//
// This function is mostly for internal use, as changing locale involves