diff options
author | Friendika <info@friendika.com> | 2010-11-15 23:27:12 -0800 |
---|---|---|
committer | Friendika <info@friendika.com> | 2010-11-15 23:27:12 -0800 |
commit | 4240a23a8a9024daab45a277d5df311762d07d49 (patch) | |
tree | 34684736305e73d727749140d1558569a4c9a1e5 /index.php | |
parent | 21c18cedc7638142a55cf9076e98db0c2f8707d3 (diff) | |
download | volse-hubzilla-4240a23a8a9024daab45a277d5df311762d07d49.tar.gz volse-hubzilla-4240a23a8a9024daab45a277d5df311762d07d49.tar.bz2 volse-hubzilla-4240a23a8a9024daab45a277d5df311762d07d49.zip |
i18n re-arrange
Diffstat (limited to 'index.php')
-rw-r--r-- | index.php | 12 |
1 files changed, 8 insertions, 4 deletions
@@ -123,14 +123,18 @@ $a->page['htmlhead'] = replace_macros($a->page['htmlhead'], array( $page = $a->page; $profile = $a->profile; $lang = get_config('system','language'); +if($lang === false) + $lang = 'en'; header("Content-type: text/html; charset=utf-8"); -$template = "view/" . (($lang) ? $lang . "/" : "") - . ((x($a->page,'template')) ? $a->page['template'] : 'default' ) - . ".php"; +$template = 'view/' . $lang . '/' + . ((x($a->page,'template')) ? $a->page['template'] : 'default' ) . '.php'; -require_once($template); +if(file_exists($template)) + require_once($template); +else + require_once(str_replace($lang . '/', '', $template)); session_write_close(); exit; |