[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug-gnubg] Changing language for GUI
From: |
Holger |
Subject: |
[Bug-gnubg] Changing language for GUI |
Date: |
Mon, 25 Aug 2003 00:28:58 +0200 |
Hi all,
I've made quite some attempts to change the used language for the GTK+
version on Windows programmatically. Nothing seemed to help.
First the situation: If the locale folder hierarchy is set up properly
gnubg starts up on Windows with the language set in Windows preferences |
Country preferences (in German Systemsteuerung | Ländereinstellungen). If
the environment variable LANG is set, this overrides the Windows setting
and gnubg uses this language.
I haven't tried it with the CLI version, for this setlocale( LC_ALL,
"it_IT" ) might be enough. But for GTK+ it isn't.
Finally, in order to try whether it would work at all I've put the
following hack instead of
setlocale (LC_ALL, "");
at the beginning of real_main:
SetEnvironmentVariable( "LANG", "it_IT" );
#if HAVE_SETLOCALE
setlocale( LC_ALL, "it_IT" );
#endif
As an aside, note that on Windows setenv is not available.
But even with this gnubg was still using German, which is my Windows setting.
On my way through the documentation I've found only one function for GTK+
related to locales.
gtk_set_locale ()
gchar* gtk_set_locale (void);
Sets the current locale according to the program environment. This is the
same as calling the libc function setlocale(LC_ALL, "") but also takes care
of the locale specific setup of the windowing system used by GDK.
You should call this function before gtk_init to support
internationalization
of your GTK+ applications.
Unfortunately, there is no gtk_set_locale that takes an argument and also
the hack above doesn't influence what it thinks is the current locale
setting. InitGTK and thus gtk_set_locale is called much later and should
have used Italian in the above example.
Does anybody have some ideas?
Regards,
Holger
- [Bug-gnubg] Changing language for GUI,
Holger <=
- Re: [Bug-gnubg] Changing language for GUI, Jim Segrave, 2003/08/25
- Re: [Bug-gnubg] Changing language for GUI, Joern Thyssen, 2003/08/25
- Re: [Bug-gnubg] Changing language for GUI, Jim Segrave, 2003/08/25
- Re: [Bug-gnubg] Changing language for GUI, Holger, 2003/08/25
- Re: [Bug-gnubg] Changing language for GUI, Joern Thyssen, 2003/08/25
- Re: [Bug-gnubg] Changing language for GUI, Nardy Pillards, 2003/08/25
- Re: [Bug-gnubg] Changing language for GUI, Jim Segrave, 2003/08/26
- Re: [Bug-gnubg] Changing language for GUI, Holger, 2003/08/25
- Re: [Bug-gnubg] Changing language for GUI, Holger, 2003/08/25
Re: [Bug-gnubg] Changing language for GUI, Joern Thyssen, 2003/08/25