Forum archive
Cannot set LC_MESSAGES to default locale
I'm running the Status.net appliance and I can't seem to figure out why /var/log/apache2/error.log is getting the following added with each page access:
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_COLLATE to default locale: No such file or directory
Any ideas?
'locale -a' gives
Which looks consistent with the languages supported in status.net as the /var/www/statusnet/locale directory contains
A hack of /var/www/statusnet/lib/util.php revealed that 'en' and 'en_US' were the languages being attempted (note there is no en_US entry in locale/ per above). The following hack the util.php file corrects the problem
function common_init_locale($language=null) { if(!$language) { $language = common_language(); } if ($language=='en_US') { $language='en_GB'; } # replace missing en_US with en_GB putenv('LANGUAGE='.$language); putenv('LANG='.$language); $ok = setlocale(LC_ALL, $language . ".utf8", $language . ".UTF8", $language . ".utf-8", $language . ".UTF-8", $language); return $ok; }'php /var/www/statusnet/scripts/setconfig.php' gaves the site language of 'en'
config.php containes $config['site']['language']='en';
So these look ok.
I hate to go forward with such a hack it will be nixed when statusnet is updated. Any ideas?