[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Bug-gnubg] Changing language for GUI
From: |
Holger |
Subject: |
Re: [Bug-gnubg] Changing language for GUI |
Date: |
Mon, 25 Aug 2003 20:16:24 +0200 |
At 15:02 25.08.2003 +0200, Jim Segrave wrote:
On Mon 25 Aug 2003 (00:28 +0200), Holger wrote:
>
> 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" );
Try putenv(), that's available under mingw.
Hmm, why didn't I try this? I've even seen it.
I've a crude hack which allows a command line flag -l (or --lang) to
be followed by a LANG environment variable:
This should work under Windows as well.
Yes, it does. :-) (And grumbling: Why does SetEnvironmentVariable not
work? M$...)
It would be nice if this could be parsed out of the command file, but
the command file handling doesn't begin until after gtk has been
started.
I had unfortunately started to code from the end and have the commands and
GUI option already done for this. Only then I found out that it seems not
to be possible to switch the GTK+ language while running.
I would have been content then to give a message like "This setting will
only go into effect the next time gnubg is started". But it doesn't work
for the reason you give above.
However, if we take another .rc-file which contains only the language code
this could be read right at the start. I suppose for reading gnubg.rc and
executing the commands therein all/most of the setup that comes before in
real_main is necessary.
I'll do this at home. I don't have the patch here at the moment.
Regards,
Holger
- [Bug-gnubg] Changing language for GUI, Holger, 2003/08/24
- 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 <=
Re: [Bug-gnubg] Changing language for GUI, Joern Thyssen, 2003/08/25