projects
/
quix0rs-gnu-social.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5472779
)
Ticket 1982: define LC_MESSAGES and friends if PHP didn't predefine them for us....
author
Brion Vibber
<brion@pobox.com>
Sun, 20 Dec 2009 23:33:33 +0000
(15:33 -0800)
committer
Brion Vibber
<brion@pobox.com>
Mon, 21 Dec 2009 17:06:07 +0000
(09:06 -0800)
lib/language.php
patch
|
blob
|
history
diff --git
a/lib/language.php
b/lib/language.php
index 0e4ccc4092aca1d71496f6b7adc27429c34ec3ac..f5ee7fac5ed142239ffa3683de992cd9e8e50683 100644
(file)
--- a/
lib/language.php
+++ b/
lib/language.php
@@
-32,6
+32,21
@@
if (!defined('STATUSNET') && !defined('LACONICA')) {
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')) {
require_once("php-gettext/gettext.inc");
}