Add wxUILocale::IsSupported()

This function can now be implemented relatively straightforwardly
(although it does require an extra check under Mac), so add it, as it
can be generally useful and we're also going to need it for our own
tests in the upcoming commit.
This commit is contained in:
Vadim Zeitlin
2021-08-30 21:02:00 +02:00
parent aa4cce8f7d
commit 32316af106
5 changed files with 38 additions and 2 deletions

View File

@@ -156,6 +156,17 @@ public:
*/
wxString GetInfo(wxLocaleInfo index,
wxLocaleCategory cat = wxLOCALE_CAT_DEFAULT) const;
/**
Return true if locale is supported on the current system.
If this function returns @a false, the other functions of this class,
such as GetInfo() and CompareStrings(), behave as in "C" locale, i.e.
it's still safe to call them, but their results don't reflect the rules
for the locale in question, but just use the default (i.e. US English)
conventions.
*/
bool IsSupported() const;
};
/**