Fine-grained control over wxLocale
Vadim Zeitlin
vadim at wxwidgets.org
Wed Apr 9 07:53:05 PDT 2008
On Wed, 9 Apr 2008 02:45:09 -0700 (PDT) Andreas <support at raumgeometrie.de> wrote:
A> So after I use wxLocale::Init I now call
A>
A> setlocale( LC_NUMERIC, "C" );
A>
A> to set just the numerical stuff to C.
A>
A> This works. Are there any problems with this approach?
Yes -- the numbers won't be shown to the users using the correct decimal
separator. The UI should really use the users locale, you should use the
"C" one for internal manipulations only. As I wrote, the simplest way to do
it is to use C++ standard streams which have their own (by default "C")
locale, setlocale() is not the right tool here as it changes the locale
globally.
Regards,
VZ
--
TT-Solutions: wxWidgets consultancy and technical support
http://www.tt-solutions.com/
More information about the wx-users
mailing list