1
1
Fork 0

i18n re-arrange

This commit is contained in:
Friendika 2010-11-15 23:27:12 -08:00
commit 4240a23a8a
30 changed files with 12 additions and 24 deletions

View file

@ -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;