summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorEvan Prodromou <evan@prodromou.name>2008-07-29 23:54:46 -0400
committerEvan Prodromou <evan@prodromou.name>2008-07-29 23:54:46 -0400
commit353aa5a0d8dd1a48cd4f6d921a0b24c5330359c0 (patch)
tree670589d72013a853fcf4e3f47c95b05cccdb6135 /lib
parentba3ca4f6bbf203b810f26ca061087fcad28218e5 (diff)
move the language info, fix dir for locales
darcs-hash:20080730035446-84dde-8ce202ea6956bb49e1be98307136fc299862ab9b.gz
Diffstat (limited to 'lib')
-rw-r--r--lib/common.php6
-rw-r--r--lib/util.php9
2 files changed, 8 insertions, 7 deletions
diff --git a/lib/common.php b/lib/common.php
index 03b8bd52a..d8471711c 100644
--- a/lib/common.php
+++ b/lib/common.php
@@ -48,9 +48,9 @@ $config =
'path' => '/',
'logfile' => NULL,
'fancy' => false,
- 'locale_path' => './locale',
- 'language' => 'en_US',
- 'languages' => get_all_languages(),
+ 'locale_path' => INSTALLDIR.'/locale',
+ 'language' => 'en_US',
+ 'languages' => get_all_languages(),
'email' =>
array_key_exists('SERVER_ADMIN', $_SERVER) ? $_SERVER['SERVER_ADMIN'] : NULL,
'broughtby' => NULL,
diff --git a/lib/util.php b/lib/util.php
index 13ce180b4..9033d7d1a 100644
--- a/lib/util.php
+++ b/lib/util.php
@@ -136,11 +136,12 @@ define('PAGE_TYPE_PREFS', 'text/html,application/xhtml+xml,application/xml;q=0.3
function common_show_header($pagetitle, $callable=NULL, $data=NULL, $headercall=NULL) {
global $config, $xw;
+ $language = common_language();
+ setlocale(LC_ALL, $language);
+ bindtextdomain("laconica", $config['site']['locale_path']);
+ textdomain("laconica");
+
$httpaccept = isset($_SERVER['HTTP_ACCEPT']) ? $_SERVER['HTTP_ACCEPT'] : NULL;
- $language = common_language();
- setlocale(LC_ALL, $language);
- bindtextdomain("laconica", $config['site']['locale_path']);
- textdomain("laconica");
# XXX: allow content negotiation for RDF, RSS, or XRDS