Re: Force english locale on Win32
- From: Daniel Elstner <daniel kitta googlemail com>
- To: klaus triendl <klaus triendl eu>
- Cc: Саша Иваненко <kitovyj mail ru>, gtkmm-list gnome org
- Subject: Re: Force english locale on Win32
- Date: Mon, 08 Jun 2009 05:08:29 +0200
Am Sonntag, den 07.06.2009, 22:41 +0200 schrieb klaus triendl:
> > putenv("LANG=en_US.UTF8");
> > putenv("LANGUAGE=en_US");
> > putenv("LC_ALL=en_US");
> > setlocale(LC_ALL, "C");
Try calling setlocale() after initializing Gtk::Main. Just in case the
locale disabling argument isn't honored.
> > But gtkmm still print russian text on the standard dialog buttons etcetera.
> > Please help to force english locale to gtkmm.
Also, it might be that you have to use non-standard Win32 API to affect
some locale settings. I don't know though.
> Just an idea, not tested though: try setting the c++ locale.
> std::locale::global(std::locale("C"));
I think this is also available directly in the API:
std::locale::global(std::locale::classic());
> The c++ locale works independently from the c-runtime locale for
> iostreams, I don't know whether it affects gtkmm.
It affects ustring::format() and compose().
--Daniel
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]