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 <[EMAIL PROTECTED]> To: Marvin Zhang <[EMAIL PROTECTED]> 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 <[EMAIL PROTECTED]> 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 _______________________________________________ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list