Fine-grained control over wxLocale
Andreas
support at raumgeometrie.de
Wed Apr 9 02:45:09 PDT 2008
On 6 Apr., 15:20, Vadim Zeitlin <va... at wxwidgets.org> wrote:
> On Sun, 6 Apr 2008 06:14:28 -0700 (PDT) Andreas <supp... at raumgeometrie.de> wrote:
>
> A> I would like the point (".") do be the decimal-separator in all
> A> languages.
>
> This is impossible -- some languages (such as German as you surely know)
> use decimal comma and not decimal point. What is possible is to use period
> for the formatting you do (the simplest way to do is to use
> std::ostringstream) or to set locale to "C" on program startup (not
> recommended).
>
> Regards,
> VZ
>
> --
> TT-Solutions: wxWidgets consultancy and technical support
> http://www.tt-solutions.com/
Hi Vadim,
thanks a lot - though this is not good news.
The problem is, that when using the german locale, all wx-Functions
use the decimal comma. I want to use the point, because I want the
strings to be compatible to common computer algebra systems. German
students are used to the decimal point anyway, all scientific
calculators use it.
I have now browsed the wx-source and seen that it uses setlocale.
So after I use wxLocale::Init I now call
setlocale( LC_NUMERIC, "C" );
to set just the numerical stuff to C.
This works. Are there any problems with this approach?
Regards,
Andreas
More information about the wx-users
mailing list