Call for volunteers [was: Re: Localization]

Mikko Rasa tdb at
Sat Oct 13 06:47:44 PDT 2012

On 13.10.2012 16:30, Lubomir I. Ivanov wrote:
> On 13 October 2012 16:00, Mikko Rasa<tdb at>  wrote:
>> On 13.10.2012 15:25, Lubomir I. Ivanov wrote:
>>> erm, i for instance am not a english native, yet prefer all my
>>> software to be in english, while keeping a non-english locale.
>>> looks like i have to use enviroment variables for subsurface to obey
>>> that...but wait subsurface on windows may overwrite my env. variable
>>> value by default, so i won't be able to do that...
>> Out of curiosity, what locale settings do you use?  LC_MESSAGES is the one
>> that controls the language used for messages, so I assume you have that set
>> to en_US or en_GB.  If other programs respect that but subsurface doesn't,
>> then we're doing something wrong.
>> I use en_US.utf8 for most categories, but fi_FI.utf8 for LC_TIME and C for
>> Windows also offers several categories for localization settings, though I'm
>> not certain which one controls (or is supposed to control) the language.
> i only tried setting LC_ALL with putenv(..) within subsurface, but
> from my tests on windows it seems that gettext is only interested in
> the LANGUAGE env. variable, but
> also the menu text are not translated.
> my main point here is that LC_* in the LANG, LANGUAGE env. variables
> are not used at all by other windows software and users don't know
> that they even exists.
> since these values don't exist, we have to force a value on subsurface
> runtime for it to be translated. but if we force a value, how would
> the user switch languages is completely beyond me.
> i'm only seeing this ATM:
> adding a command line option:
> subsurface.exe -lang=xx_XX
> and telling the user that he/she can use it to control the language.

The LC_* variables don't exist on Windows, because it uses a different 
method of retrieving the user's preferred language.  The relevant API 
call appears to be GetUserDefaultUILanguage.  If gettext doesn't use 
this on Windows, I'd consider it broken.  Unfortunately, it's probably 
still the best, or at least most widely known, choice.

Using putenv to set the locale is an ugly hack, but if gettext can't be 
coaxed to do the right thing, then so be it.


More information about the subsurface mailing list