summaryrefslogtreecommitdiff
path: root/lib/util.php
diff options
context:
space:
mode:
authorEvan Prodromou <evan@prodromou.name>2008-07-30 22:04:33 -0400
committerEvan Prodromou <evan@prodromou.name>2008-07-30 22:04:33 -0400
commitf2ae665e13f9eec7183709e85fec04009eff41ec (patch)
treeb132fe913c7e7fef9a1381ea391802c7a5d5bf83 /lib/util.php
parent93d25bec337ed20dd9576fda870c25d7c27420f3 (diff)
let @rejon do the homework http://ur1.ca/17c
darcs-hash:20080731020433-84dde-641127c2de488087c1525fc773d544ba5b136550.gz
Diffstat (limited to 'lib/util.php')
-rw-r--r--lib/util.php10
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/util.php b/lib/util.php
index 7e1e8f7c2..9589ea035 100644
--- a/lib/util.php
+++ b/lib/util.php
@@ -137,8 +137,16 @@ function common_show_header($pagetitle, $callable=NULL, $data=NULL, $headercall=
global $config, $xw;
$language = common_language();
- setlocale(LC_ALL, $language);
+ # So we don't have to make people install the gettext locales
+ putenv('LANGUAGE='.$language);
+ putenv('LANG='.$language);
+ $locale_set = setlocale(LC_ALL, $language . ".utf8",
+ $language . ".UTF8",
+ $language . ".utf-8",
+ $language . ".UTF-8",
+ $language);
bindtextdomain("laconica", $config['site']['locale_path']);
+ bind_textdomain_codeset("laconica", "UTF-8");
textdomain("laconica");
$httpaccept = isset($_SERVER['HTTP_ACCEPT']) ? $_SERVER['HTTP_ACCEPT'] : NULL;