Skip to content

Commit 9725a27

Browse files
author
fantu
committed
if lang file for current language not exist load master language file
1 parent baac49e commit 9725a27

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

interface/lib/app.inc.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,9 @@ public function lng($text)
145145
//* loading global and module Wordbook
146146
// TODO: this need to be made clearer somehow - pedro
147147
@include_once(ISPC_ROOT_PATH.'/lib/lang/'.$_SESSION['s']['language'].'.lng');
148-
@include_once(ISPC_ROOT_PATH.'/web/'.$_SESSION['s']['module']['name'].'/lib/lang/'.$_SESSION['s']['language'].'.lng');
148+
$lng_file = ISPC_ROOT_PATH.'/web/'.$_SESSION['s']['module']['name'].'/lib/lang/'.$_SESSION['s']['language'].'.lng';
149+
if(!file_exists($lng_file)) $lng_file = ISPC_ROOT_PATH.'/web/'.$_SESSION['s']['module']['name'].'/lib/lang/en.lng';
150+
include_once($lng_file);
149151
$this->_wb = $wb;
150152
$this->_language_inc = 1;
151153
}

0 commit comments

Comments
 (0)