summaryrefslogtreecommitdiff
path: root/lib/language.php
diff options
context:
space:
mode:
authorSarven Capadisli <csarven@status.net>2009-12-21 22:07:59 +0000
committerSarven Capadisli <csarven@status.net>2009-12-21 22:07:59 +0000
commitca6782683190541c1fef87c408ed737a0e3bae57 (patch)
treef45b62d3dec2358d46fe7cea9566008d5a426adb /lib/language.php
parent1600ae9679a144be26171aff927761b74d69ec3f (diff)
parent1166d522fb59f6c24532369818b70a1e940f7909 (diff)
Merge branch '0.9.x' of git@gitorious.org:statusnet/mainline into 0.9.x
Diffstat (limited to 'lib/language.php')
-rw-r--r--lib/language.php15
1 files changed, 15 insertions, 0 deletions
diff --git a/lib/language.php b/lib/language.php
index 0e4ccc409..f5ee7fac5 100644
--- 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");
}