Re: How to set locale dynamicly under GTK-win application?



I set but it still doesn't work.

int main(int argc, char *argv[])
{
...

    SetEnvironmentVariable("LANG", "zh_CN");
    SetEnvironmentVariable("LC_ALL", "zh_CN");
    
    gtk_init(&argc, &argv);
...
}


----- Original Message ----
From: Daniel Atallah <daniel atallah gmail com>
To: Marvin Zhang <marvin2yuer yahoo com>
Cc: gtk-app-devel-list gnome org
Sent: Monday, May 12, 2008 8:54:45 PM
Subject: Re: How to set locale dynamicly under GTK-win application?

On Mon, May 12, 2008 at 8:50 PM, Marvin Zhang <marvin2yuer yahoo com> wrote:
There is a method to change the locale by setting the environment LC_ALL in windows (2000 or XP). But how 
to change the locale in the application?
 I tried
 1. setlocale(LC_ALL, "zh_CN");
 2. SetEnvironmentVariable("LC_ALL", "zh_CN");

Setting the "LANG" environment variable before calling gtk_init() should do it.

-D



      ____________________________________________________________________________________
Be a better friend, newshound, and 
know-it-all with Yahoo! Mobile.  Try it now.  http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]