aboutsummaryrefslogtreecommitdiffstats
path: root/index.php
diff options
context:
space:
mode:
authorFriendika <info@friendika.com>2010-11-15 23:27:12 -0800
committerFriendika <info@friendika.com>2010-11-15 23:27:12 -0800
commit4240a23a8a9024daab45a277d5df311762d07d49 (patch)
tree34684736305e73d727749140d1558569a4c9a1e5 /index.php
parent21c18cedc7638142a55cf9076e98db0c2f8707d3 (diff)
downloadvolse-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.php12
1 files changed, 8 insertions, 4 deletions
diff --git a/index.php b/index.php
index 91b864df8..cf20d35a2 100644
--- a/index.php
+++ b/index.php
@@ -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;