summaryrefslogtreecommitdiff
path: root/lib/util.php
diff options
context:
space:
mode:
authorEvan Prodromou <evan@status.net>2010-07-28 17:50:49 -0400
committerEvan Prodromou <evan@status.net>2010-07-28 17:50:49 -0400
commita01bc6b575861c4fc4fa00c988a7a907922187b7 (patch)
tree72eea27c72dad0f7bb4308851695483e69e5cfeb /lib/util.php
parent5688c635a62ea109a9aa9565e40e994ea984cd95 (diff)
parent659e8b26acffd3bfbe097693d3f75e20d2f78a0f (diff)
Merge branch 'googleadsadminpanel' into testing
Diffstat (limited to 'lib/util.php')
-rw-r--r--lib/util.php10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/util.php b/lib/util.php
index 2a90b56a9..9f62097d5 100644
--- a/lib/util.php
+++ b/lib/util.php
@@ -88,8 +88,8 @@ function common_init_language()
// don't do the job. en_US.UTF-8 should be there most of the
// time, but not guaranteed.
$ok = common_init_locale("en_US");
- if (!$ok) {
- // Try to find a complete, working locale...
+ if (!$ok && strtolower(substr(PHP_OS, 0, 3)) != 'win') {
+ // Try to find a complete, working locale on Unix/Linux...
// @fixme shelling out feels awfully inefficient
// but I don't think there's a more standard way.
$all = `locale -a`;
@@ -101,9 +101,9 @@ function common_init_language()
}
}
}
- if (!$ok) {
- common_log(LOG_ERR, "Unable to find a UTF-8 locale on this system; UI translations may not work.");
- }
+ }
+ if (!$ok) {
+ common_log(LOG_ERR, "Unable to find a UTF-8 locale on this system; UI translations may not work.");
}
$locale_set = common_init_locale($language);
}