Project

General

Profile

« Previous | Next » 

Revision 629

Added by doc almost 17 years ago

added possibility to select the default backend language during installation process

View differences:

trunk/CHANGELOG
12 12

  
13 13
------------------------------------- 2.7.0 -------------------------------------
14 14
28-Jan-2008 Christian Sommer
15
+	Re-introduced Changeset 593 (filename in pages/ from page_title instead of menu_title)
15
!	added possibility to select the default backend language during installation process
16
!	Re-introduced Changeset 593 (filename in pages/ from page_title instead of menu_title)
16 17
#	Fixed some bugs in the Javascript Admin modul
17 18
28-Jan-2008 Thomas Hornik
18 19
+	Added Text-CAPTCHA on request. The captcha-text will be stored in temp/.captcha_text.txt
trunk/wb/install/save.php
163 163
}
164 164
// End path and timezone details code
165 165

  
166
// Get the default language
167
$allowed_languages = array('CA', 'DA', 'DE', 'EN', 'ES', 'ET', 'FI', 'FR', 'HR', 'HU', 'IT', 'LV', 'NL', 'PT','SE', 'TR');
168
if(!isset($_POST['default_language']) OR !in_array($_POST['default_language'], $allowed_languages)) {
169
	set_error('Please select a valid default backend language');
170
} else {
171
	$default_language = $_POST['default_language'];
172
	// make sure the selected language file exists in the language folder
173
	if(!file_exists('../languages/' .$default_language .'.php')) {
174
		set_error('The language file: \'' .$default_language .'.php\' is missing. Upload file to language folder or choose another language');
175
	}
176
}
177
// End default language details code
178

  
166 179
// Begin operating system specific code
167 180
// Get operating system
168 181
if(!isset($_POST['operating_system']) OR $_POST['operating_system'] != 'linux' AND $_POST['operating_system'] != 'windows') {
......
422 435
	." ('wysiwyg_style', 'font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px;'),"
423 436
	." ('rename_files_on_upload', 'php,asp,phpx,aspx'),"
424 437
	." ('er_level', ''),"
425
	." ('default_language', 'EN'),"
438
	." ('default_language', '$default_language'),"
426 439
	." ('app_name', 'wb_$session_rand'),"
427 440
	." ('default_timezone', '$default_timezone'),"
428 441
	." ('default_date_format', 'M d Y'),"
......
473 486
	       . ' `timezone` INT NOT NULL DEFAULT \'0\','
474 487
	       . ' `date_format` VARCHAR( 255 ) NOT NULL DEFAULT \'\' ,'
475 488
	       . ' `time_format` VARCHAR( 255 ) NOT NULL DEFAULT \'\' ,'
476
	       . ' `language` VARCHAR( 5 ) NOT NULL DEFAULT \'EN\' ,'
489
	       . ' `language` VARCHAR( 5 ) NOT NULL DEFAULT \'' .$default_language .'\' ,'
477 490
	       . ' `home_folder` TEXT NOT NULL ,'
478 491
	       . ' `login_when` INT NOT NULL  DEFAULT \'0\','
479 492
	       . ' `login_ip` VARCHAR( 15 ) NOT NULL DEFAULT \'\' ,'
trunk/wb/install/index.php
167 167
		</table>
168 168
		<table cellpadding="3" cellspacing="0" width="100%" align="center">
169 169
		<tr>
170
			<td colspan="2"><h1>Step 3</h1>Please check your path settings, and select your default timezone...</td>
170
			<td colspan="2"><h1>Step 3</h1>Please check your path settings, and select a default timezone and a default backend language...</td>
171 171
		</tr>
172 172
		<tr>
173 173
			<td width="125" style="color: #666666;">
......
230 230
				</select>
231 231
			</td>
232 232
		</tr>
233
		<tr>
234
			<td style="color: #666666;">
235
				Default Language:
236
			</td>
237
			<td>
238
				<select tabindex="3" name="default_language" style="width: 100%;">
239
					<?php
240
					$DEFAULT_LANGUAGE = array(
241
						'CA'=>'Catalan', 'DA'=>'Danish', 'DE'=>'Deutsch', 'EN'=>'English',
242
						'ES'=>'Spanish', 'ET'=>'Eesti', 'FI'=>'Suomi', 'FR'=>'Fran&ccedil;ais',
243
						'HR'=>'Hrvatski', 'HU'=>'Magyar','IT'=>'Italiano', 'LV'=>'Latviesu',
244
						'NL'=>'Nederlands','PT'=>'Portuguese (Brazil)','SE'=>'Svenska', 'TR'=>'Turkish'
245
					);
246
					foreach($DEFAULT_LANGUAGE as $lang_id => $lang_title) {
247
						?>
248
							<option value="<?php echo $lang_id; ?>"<?php if(isset($_SESSION['default_language']) AND $_SESSION['default_language'] == $lang_id) { echo ' selected'; } elseif(!isset($_SESSION['default_language']) AND $lang_id == 'EN') { echo 'selected'; } ?>><?php echo $lang_title; ?></option>
249
						<?php
250
					}
251
					?>
252
				</select>
253
			</td>
254
		</tr>
233 255
		</table>
234 256
		<table cellpadding="5" cellspacing="0" width="100%" align="center">
235 257
		<tr>

Also available in: Unified diff