Project

General

Profile

« Previous | Next » 

Revision 2098

Added by darkviper over 10 years ago

! activate class Translate for all addons in admin/ (except pages/)
! class.admin >> add translation of the current theme to Translate

View differences:

index.php
27 27
// Make news post access files dir
28 28
if(!function_exists('get_variable_content')) {require($oReg->AppPath.'framework/functions.php');}
29 29
$oReg->getWbConstants();
30
$mLang = Translate::getInstance();
31
$mLang->enableAddon('admin\addons');
30
$oTrans = Translate::getInstance();
31
$oTrans->enableAddon('admin\\modules');
32 32

  
33 33
// Setup template object, parse vars to it, then parse it
34 34
// Create new template object
......
36 36
// $template->debug = true;
37 37
$template->set_file('page', 'modules.htt');
38 38
$template->set_block('page', 'main_block', 'main');
39

  
39
$template->set_var($oTrans->getLangArray());
40 40
// Insert values into module list
41 41
$template->set_block('main_block', 'module_list_block', 'module_list');
42 42
$aAddonsList = array();
......
121 121
	$template->set_var('DISPLAY_MANUAL_INSTALL', 'hide');
122 122
}
123 123

  
124
/*-- insert all needed vars from language files ----------------------------------------*/
125
$template->set_var($mLang->getLangArray());
126

  
127 124
// insert urls
128 125
$template->set_var(array(
129 126
/** @todo the following 3 rtrims can be removed, after using of WB_PATH/s.o is changed in templates **/
......
136 133
// Insert language text and messages
137 134
$template->set_var(array(
138 135
	'URL_TEMPLATES' => $admin->get_permission('templates')
139
	                   ? '<a href="'.$oReg->AcpUrl.'templates/index.php">'.$mLang->MENU_TEMPLATES.'</a>'
140
	                   : '<b>'.$mLang->MENU_TEMPLATES.'</b>',
136
	                   ? '<a href="'.$oReg->AcpUrl.'templates/index.php">'.$oTrans->MENU_TEMPLATES.'</a>'
137
	                   : '<b>'.$oTrans->MENU_TEMPLATES.'</b>',
141 138
	'URL_LANGUAGES' => $admin->get_permission('languages') 
142
	                   ? '<a href="'.$oReg->AcpUrl.'languages/index.php">'.$mLang->MENU_LANGUAGES.'</a>'
143
	                   : '<b>'.$mLang->MENU_LANGUAGES.'</b>',
139
	                   ? '<a href="'.$oReg->AcpUrl.'languages/index.php">'.$oTrans->MENU_LANGUAGES.'</a>'
140
	                   : '<b>'.$oTrans->MENU_LANGUAGES.'</b>',
144 141
	'URL_ADVANCED'  => $admin->get_permission('modules_advanced') 
145
	                   ? '<a href="' . $oReg->AcpUrl.'modules/index.php?advanced">'.$mLang->TEXT_ADVANCED.'</a>'
146
	                   : '<b>'.$mLang->TEXT_ADVANCED.'</b>', 'HEADING_CHANGE_TEMPLATE_NOTICE' => ''
142
	                   ? '<a href="' . $oReg->AcpUrl.'modules/index.php?advanced">'.$oTrans->TEXT_ADVANCED.'</a>'
143
	                   : '<b>'.$oTrans->TEXT_ADVANCED.'</b>', 'HEADING_CHANGE_TEMPLATE_NOTICE' => ''
147 144
	)
148 145
);
149 146

  

Also available in: Unified diff