Demonstrate the thousands separator in internat sample too

Use a number > 1000 to show the difference between the locales.
This commit is contained in:
Vadim Zeitlin 2021-08-15 15:02:21 +02:00
parent c746953f9b
commit 9205209099

View File

@ -400,9 +400,10 @@ MyFrame::MyFrame()
topSizer->Add(grid, wxSizerFlags().Center().Border()); topSizer->Add(grid, wxSizerFlags().Center().Border());
// show the difference between wxString::Format() and wxNumberFormatter: // show the difference (in decimal and thousand separator, hence use a
// the former uses the current C locale, while the latter uses the UI // floating point number > 1000) between wxString::Format() and
// locale // wxNumberFormatter: the former uses the current C locale, while the
// latter uses the UI locale
topSizer->Add(new wxStaticText topSizer->Add(new wxStaticText
( (
panel, panel,
@ -410,8 +411,8 @@ MyFrame::MyFrame()
wxString::Format wxString::Format
( (
_("Number in UI locale: %s; in C locale: %.2f"), _("Number in UI locale: %s; in C locale: %.2f"),
wxNumberFormatter::ToString(5.67, 2), wxNumberFormatter::ToString(1234567.89, 2),
5.67 1234567.89
) )
), ),
wxSizerFlags().Center().Border()); wxSizerFlags().Center().Border());