Ticket 1982: define LC_MESSAGES and friends if PHP didn't predefine them for us. (Known problem on Win32)

This commit is contained in:
Brion Vibber 2009-12-20 15:33:33 -08:00
parent 5472779240
commit a06af3f125

View File

@ -32,6 +32,21 @@ if (!defined('STATUSNET') && !defined('LACONICA')) {
exit(1); exit(1);
} }
// Locale category constants are usually predefined, but may not be
// on some systems such as Win32.
$LC_CATEGORIES = array('LC_CTYPE',
'LC_NUMERIC',
'LC_TIME',
'LC_COLLATE',
'LC_MONETARY',
'LC_MESSAGES',
'LC_ALL');
foreach ($LC_CATEGORIES as $key => $name) {
if (!defined($name)) {
define($name, $key);
}
}
if (!function_exists('gettext')) { if (!function_exists('gettext')) {
require_once("php-gettext/gettext.inc"); require_once("php-gettext/gettext.inc");
} }