diff --git a/interface/wx/intl.h b/interface/wx/intl.h index 92902c1b7d..7cd5ab6964 100644 --- a/interface/wx/intl.h +++ b/interface/wx/intl.h @@ -116,6 +116,9 @@ enum wxLocaleInfo This value can be used with either wxLOCALE_CAT_NUMBER or wxLOCALE_CAT_MONEY categories. + + By default, i.e. when wxLOCALE_CAT_DEFAULT is used, the separator for + numbers is returned. */ wxLOCALE_THOUSANDS_SEP, @@ -124,6 +127,9 @@ enum wxLocaleInfo This value can be used with either wxLOCALE_CAT_NUMBER or wxLOCALE_CAT_MONEY categories. + + By default, i.e. when wxLOCALE_CAT_DEFAULT is used, the decimal point + for numbers is returned. */ wxLOCALE_DECIMAL_POINT, diff --git a/src/common/intl.cpp b/src/common/intl.cpp index 6dc41e4b05..d9b166557d 100644 --- a/src/common/intl.cpp +++ b/src/common/intl.cpp @@ -1935,22 +1935,34 @@ wxString wxLocale::GetInfo(wxLocaleInfo index, wxLocaleCategory cat) switch ( index ) { case wxLOCALE_THOUSANDS_SEP: - if ( cat == wxLOCALE_CAT_NUMBER ) - return lc->thousands_sep; - else if ( cat == wxLOCALE_CAT_MONEY ) - return lc->mon_thousands_sep; + switch ( cat ) + { + case wxLOCALE_CAT_DEFAULT: + case wxLOCALE_CAT_NUMBER: + return lc->thousands_sep; - wxFAIL_MSG( "invalid wxLocaleCategory" ); + case wxLOCALE_CAT_MONEY: + return lc->mon_thousands_sep; + + default: + wxFAIL_MSG( "invalid wxLocaleCategory" ); + } break; case wxLOCALE_DECIMAL_POINT: - if ( cat == wxLOCALE_CAT_NUMBER ) - return lc->decimal_point; - else if ( cat == wxLOCALE_CAT_MONEY ) - return lc->mon_decimal_point; + switch ( cat ) + { + case wxLOCALE_CAT_DEFAULT: + case wxLOCALE_CAT_NUMBER: + return lc->decimal_point; - wxFAIL_MSG( "invalid wxLocaleCategory" ); + case wxLOCALE_CAT_MONEY: + return lc->mon_decimal_point; + + default: + wxFAIL_MSG( "invalid wxLocaleCategory" ); + } break; case wxLOCALE_SHORT_DATE_FMT: