Add wxUILocale with minimal functionality

Use it in the sample to show what (little) it can do right now.
This commit is contained in:
Vadim Zeitlin
2021-08-13 23:29:42 +02:00
parent b12961f992
commit b9cbe6770f
22 changed files with 1178 additions and 72 deletions

View File

@@ -18,6 +18,7 @@
#endif // WX_PRECOMP
#include "wx/intl.h"
#include "wx/uilocale.h"
#if wxUSE_INTL
@@ -239,4 +240,17 @@ TEST_CASE("wxLocale::Default", "[locale]")
#endif // wxUSE_UNICODE
// This test doesn't run by default as it only works in locales using decimal
// point as separator, which doesn't need to be the case.
TEST_CASE("wxUILocale::GetInfo", "[.][uilocale]")
{
REQUIRE( wxUILocale::UseDefault() );
const wxUILocale& loc = wxUILocale::GetCurrent();
WARN( "Using locale " << loc.GetName() );
CHECK( loc.GetInfo(wxLOCALE_DECIMAL_POINT) == "." );
}
#endif // wxUSE_INTL