Skip to content

Commit 2eff06f

Browse files
committed
Fixed: FS#784 - Changing of language does not affect menus
1 parent b6b7934 commit 2eff06f

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

interface/lib/app.inc.php

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -151,17 +151,14 @@ public function error($msg, $next_link = '', $stop = true, $priority = 1)
151151
public function lng($text)
152152
{
153153
if($this->_language_inc != 1) {
154-
//* loading global and module Wordbook
155-
// TODO: this need to be made clearer somehow - pedro
156-
//@include_once(ISPC_ROOT_PATH.'/lib/lang/'.$_SESSION['s']['language'].'.lng');
154+
//* loading global Wordbook
157155
$this->load_language_file('/lib/lang/'.$_SESSION['s']['language'].'.lng');
156+
//* Load module wordbook, if it exists
158157
if(isset($_SESSION['s']['module']['name']) && isset($_SESSION['s']['language'])) {
159158
$lng_file = '/web/'.$_SESSION['s']['module']['name'].'/lib/lang/'.$_SESSION['s']['language'].'.lng';
160-
if(!file_exists($lng_file)) $lng_file = '/web/'.$_SESSION['s']['module']['name'].'/lib/lang/en.lng';
161-
//@include_once($lng_file);
159+
if(!file_exists(ISPC_ROOT_PATH.$lng_file)) $lng_file = '/web/'.$_SESSION['s']['module']['name'].'/lib/lang/en.lng';
162160
$this->load_language_file($lng_file);
163161
}
164-
//if(isset($wb)) $this->_wb = $wb;
165162
$this->_language_inc = 1;
166163
}
167164
if(!empty($this->_wb[$text])) {

0 commit comments

Comments
 (0)