Issue 2241: added language selector to the admin wizard
This commit is contained in:
parent
295489e9a5
commit
5df20fda11
|
@ -77,6 +77,7 @@ function install_post(&$a) {
|
||||||
$dbdata = notags(trim($_POST['dbdata']));
|
$dbdata = notags(trim($_POST['dbdata']));
|
||||||
$phpath = notags(trim($_POST['phpath']));
|
$phpath = notags(trim($_POST['phpath']));
|
||||||
$timezone = notags(trim($_POST['timezone']));
|
$timezone = notags(trim($_POST['timezone']));
|
||||||
|
$language = notags(trim($_POST['language']));
|
||||||
$adminmail = notags(trim($_POST['adminmail']));
|
$adminmail = notags(trim($_POST['adminmail']));
|
||||||
|
|
||||||
// connect to db
|
// connect to db
|
||||||
|
@ -89,6 +90,7 @@ function install_post(&$a) {
|
||||||
'$dbpass' => $dbpass,
|
'$dbpass' => $dbpass,
|
||||||
'$dbdata' => $dbdata,
|
'$dbdata' => $dbdata,
|
||||||
'$timezone' => $timezone,
|
'$timezone' => $timezone,
|
||||||
|
'$language' => $language,
|
||||||
'$urlpath' => $urlpath,
|
'$urlpath' => $urlpath,
|
||||||
'$phpath' => $phpath,
|
'$phpath' => $phpath,
|
||||||
'$adminmail' => $adminmail
|
'$adminmail' => $adminmail
|
||||||
|
@ -273,6 +275,8 @@ function install_content(&$a) {
|
||||||
|
|
||||||
$adminmail = notags(trim($_POST['adminmail']));
|
$adminmail = notags(trim($_POST['adminmail']));
|
||||||
$timezone = ((x($_POST,'timezone')) ? ($_POST['timezone']) : 'America/Los_Angeles');
|
$timezone = ((x($_POST,'timezone')) ? ($_POST['timezone']) : 'America/Los_Angeles');
|
||||||
|
/* Installed langs */
|
||||||
|
$lang_choices = get_avaiable_languages();
|
||||||
|
|
||||||
$tpl = get_markup_template('install_settings.tpl');
|
$tpl = get_markup_template('install_settings.tpl');
|
||||||
$o .= replace_macros($tpl, array(
|
$o .= replace_macros($tpl, array(
|
||||||
|
@ -292,6 +296,7 @@ function install_content(&$a) {
|
||||||
|
|
||||||
'$timezone' => field_timezone('timezone', t('Please select a default timezone for your website'), $timezone, ''),
|
'$timezone' => field_timezone('timezone', t('Please select a default timezone for your website'), $timezone, ''),
|
||||||
|
|
||||||
|
'$language' => array('language', t('System Language:'), $language, t('Set the default language for your Friendica installation interface and to send emails.'), $lang_choices),
|
||||||
'$baseurl' => $a->get_baseurl(),
|
'$baseurl' => $a->get_baseurl(),
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -20,6 +20,10 @@ $a->path = '{{$urlpath}}';
|
||||||
|
|
||||||
$default_timezone = '{{$timezone}}';
|
$default_timezone = '{{$timezone}}';
|
||||||
|
|
||||||
|
// Default system language
|
||||||
|
|
||||||
|
$a->config['system']['language'] = '{{$language}}';
|
||||||
|
|
||||||
// What is your site name?
|
// What is your site name?
|
||||||
|
|
||||||
$a->config['sitename'] = "My Friend Network";
|
$a->config['sitename'] = "My Friend Network";
|
||||||
|
|
|
@ -19,6 +19,7 @@
|
||||||
|
|
||||||
{{include file="field_input.tpl" field=$adminmail}}
|
{{include file="field_input.tpl" field=$adminmail}}
|
||||||
{{$timezone}}
|
{{$timezone}}
|
||||||
|
{{include file="field_select.tpl" field=$language}}
|
||||||
|
|
||||||
<input id="install-submit" type="submit" name="submit" value="{{$submit|escape:'html'}}" />
|
<input id="install-submit" type="submit" name="submit" value="{{$submit|escape:'html'}}" />
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue