From f76746b399a9abd253fc5c28190729e1694ba217 Mon Sep 17 00:00:00 2001 From: Leland Lucius Date: Sat, 16 May 2015 00:21:12 -0500 Subject: [PATCH] Force use of "period" as decimal and nothing as thousands separator Since we don't actually change the locale when we change languages, we can't use whatever is defined in the locale for the decimal and thousands separator. This is because standard library functions are used to format and parse numbers and since these library functions use whatever is set for the current locale, we can use comma for the fraction separator or the period for the thousands separator. --- src/widgets/numformatter.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/widgets/numformatter.cpp b/src/widgets/numformatter.cpp index d6aa040cf..844a01dae 100644 --- a/src/widgets/numformatter.cpp +++ b/src/widgets/numformatter.cpp @@ -120,7 +120,7 @@ private: wxChar NumberFormatter::GetDecimalSeparator() { -#if wxUSE_INTL +#if defined(WE_DO_NOT_CHANGE_THE_LOCALE_SO_PERIOD_IS_ALWAYS_THE_SEPERATOR) //wxUSE_INTL // Notice that while using static variable here is not MT-safe, the worst // that can happen is that we redo the initialization if we're called // concurrently from more than one thread so it's not a real problem. @@ -158,7 +158,7 @@ wxChar NumberFormatter::GetDecimalSeparator() bool NumberFormatter::GetThousandsSeparatorIfUsed(wxChar *sep) { -#if wxUSE_INTL +#if defined(WE_DO_NOT_CHANGE_THE_LOCALE_SO_NO_SEPERATOR) //wxUSE_INTL static wxChar s_thousandsSeparator = 0; static LocaleId s_localeUsedForInit;