]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
let @rejon do the homework http://ur1.ca/17c
authorEvan Prodromou <evan@prodromou.name>
Thu, 31 Jul 2008 02:04:33 +0000 (22:04 -0400)
committerEvan Prodromou <evan@prodromou.name>
Thu, 31 Jul 2008 02:04:33 +0000 (22:04 -0400)
darcs-hash:20080731020433-84dde-641127c2de488087c1525fc773d544ba5b136550.gz

lib/util.php

index 7e1e8f7c2883576457bcd34771e0b1d4faf9cc35..9589ea03557c8546a2cb148fc1b2c25d65a18eb8 100644 (file)
@@ -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;