Revision 421
Added by Matthias almost 18 years ago
details.php | ||
---|---|---|
55 | 55 |
$module = $result->fetchRow(); |
56 | 56 |
} |
57 | 57 |
|
58 |
// Get language description if available |
|
59 |
// First get users defined language |
|
60 |
$query = "SELECT language FROM ".TABLE_PREFIX."users WHERE user_id = '".$admin->get_user_id()."'"; |
|
61 |
$results = $database->query($query); |
|
62 |
if($results->numRows() > 0) { |
|
63 |
// We found a language for the user, store it |
|
64 |
$user_info=$results->fetchRow(); |
|
65 |
$user_language = $user_info['language']; |
|
66 |
|
|
67 |
// Next check for language file in module dir and insert the variables from that file |
|
68 |
if(file_exists(WB_PATH.'/modules/'.$file.'/languages/'.$user_language.'.php')) { |
|
69 |
require(WB_PATH.'/modules/'.$file.'/languages/'.$user_language.'.php'); |
|
70 |
|
|
71 |
// Check to see if new variable exists... -> $MODULE_DESCRIPTION |
|
72 |
if (isset($MODULE_DESCRIPTION)) { |
|
73 |
// Override the module-description with correct desription in users language |
|
74 |
$module['description']=$MODULE_DESCRIPTION; |
|
75 |
} |
|
76 |
} |
|
77 |
} |
|
78 |
|
|
58 | 79 |
$template->set_var(array( |
59 | 80 |
'NAME' => $module['name'], |
60 | 81 |
'AUTHOR' => $module['author'], |
Also available in: Unified diff
Added new variable $MODULE_DESCRIPTION wich allows to have optional a language specific description of the modules in the language files of the modules.