Demonstrate the thousands separator in internat sample too
Use a number > 1000 to show the difference between the locales.
This commit is contained in:
parent
c746953f9b
commit
9205209099
@ -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());
|
||||||
|
Loading…
Reference in New Issue
Block a user