[Mapbender-dev] Re: LC_MESSAGES and Windows (again)

Thomas Baschetti Thomas.Baschetti at gmx.de
Thu Mar 5 14:14:41 EST 2009


Christoph Baudson schrieb:
> Thomas Baschetti schrieb:
>> OK, no PHP-Error, but still language support under windows seems to fail:
>>
>> $selectedLocale = setlocale(LC_MESSAGES, $locale);
>> $e = new Mb_notice("setlocal fuer LC_MESSAGES " . LC_MESSAGES . " auf 
>> locale: >" . $selectedLocale . "<");
>>
>> results in
>> Notice: setlocal fuer LC_MESSAGES 6 auf locale: ><
[...]
>>
>> Can anyone confirm this?
> 
> Yes, I've experience the same problem...but no solution yet. Where are 
> the Windows gurus?
> 
> I will re-open the ticket.

if i see it correctly, we are using lc_messages mainly for _determing_ 
the right language, right?
So why not just use e.g. LC_CTYPE?
Or something like:

if (defined('LC_MESSAGES')){
	$selectedLocale = setlocale(LC_MESSAGES, $locale);
}
else{
	$saveme=setlocale(LC_CTYPE,0);
	$selectedLocale=setlocale(LC_CTYPE,$locale);
	$saveme=setlocale(LC_CTYPE,$saveme);
}

if we must preserve LC_CTYPE.

Ciao
Thomas


More information about the Mapbender_dev mailing list